When uploading images in php, what common classes can be used for proportional compression? A small system that uploads images.
However, the uploader has no idea about the image size. he does not know that there is a problem with the webpage display of the 4000*3800 resolution image taken by the camera, the uploaded images must be displayed on the webpage, and the number of uploaded images is large.
So I would like to ask if there are any classes that can do the following steps...
1. receive jpg, png, and bmp files (the uploader may be ignorant of the possibility of using all types)
2. check that if the image width is greater than 1000 or the height is greater than 1000, the image will be compressed to a width or height of not greater than PX in an equal ratio.
(Skip this step if both width and height are less than 1000)
3. compress and optimize the size of a piece
Can I introduce this category? Or is there an image Upload plug-in for this type? The paid plug-in is recommended.
Thank you.
Reply to discussion (solution)
The class, http://blog.csdn.net/fdipzone/article/details/9316385 that I wrote before
The class, http://blog.csdn.net/fdipzone/article/details/9316385 that I wrote before
It is a little different from what I want to use.
But it is very useful for reference. if you have time to write your own image class, you must first thank you.