Why can't I decompress an 8 K image in PHP and press it to the end of the 8 K image.
Who can tell me where to set the size or use other methods to solve the problem?
Reply to discussion (solution)
What to extract images ?? Clear points
I first compress all jpg images, then upload the compressed package to the server on the webpage, decompress the package while uploading it to the directory I want. The extracted image is only 8 KB in size. Many images show only half of the image above, and none of the images below are displayed.
Is the size of the uploaded image 8 K.
The image in the compressed package is still the original size. if the size of the extracted image is smaller than 8 kB, all the images will be displayed. if the size of the extracted image is greater than 8 KB, the image will be shown as 8 kB, more than one department is gray, just like this.
The image above is decompressed by PHP... Only more than 8 K is missing.
Paste your code
Maybe you can upload the compressed package to a place for download and show it to me.
$ Zip = zip_open ("/php/test/test.zip ");
If ($ zip ){
While ($ zip_entry = zip_read ($ zip )){
$ Fp = fopen ("/php/". zip_entry_name ($ zip_entry), 'w ');
If (zip_entry_open ($ zip, $ zip_entry, "r ")){
$ Buf = zip_entry_read ($ zip_entry, zip_entry_filesize ($ zip_entry ));
Fwrite ($ fp, '$ buf ');
Zip_entry_close ($ zip_entry );
Fclose ($ fp );
}
}
Zip_close ($ zip );
}
I felt it was a problem in the red part, but I went to the program and didn't find any place to control its size.
Is it set in PHP?