I used to generate a thumbnail on the Android client and then send it to the server. now I use php to generate a thumbnail on the server. this experiment is successful. However, if it is an image sent from the client, only source images can be saved, and Thumbnails cannot be generated on the server. I made a judgment, because we need to use $ src_imageImageCreateFromBMP ($ uploads_dir. $ uploadname) to call the source image. Is it because when the client sends the source image to the server, the original image is called before being uploaded, causing an error? However, I have added an if (move_uploaded_file ($ _ FILES [& #39; imag php
I used to generate a thumbnail on the Android client and then send it to the server. now I use php to generate a thumbnail on the server. this experiment is successful. However, if it is an image sent from the client, only source images can be saved, and Thumbnails cannot be generated on the server. I made a judgment, because $ src_image = ImageCreateFromBMP ($ uploads_dir. $ uploadname) to call the source image. Is it because when the client sends the source image to the server, the original image is called before being uploaded, causing an error? However, I have added an if (move_uploaded_file ($ _ FILES ['image'] ['tmp _ name'], $ uploads_dir. $ uploadname) to judge it. Then I added a while loop while (1)
{
$ Src_image = ImageCreateFromJPEG ($ uploads_dir. $ uploadname );
}
If ($ src_image)
{
Break;
}, That is, the source image is continuously called until it is successful, but it still does not work. There is no program error, because you have written a form on the local machine for submission to generate a thumbnail. Thank you!