PHP processes images. how can I set the size of uploaded images to less than KB? Can I only change the image size? In fact, what is the relationship between the Pixel, size, and definition of the image .. ------ Solution -------------------- yes. The size will be affected. ------ Solution ------------------ control the pressure on PHP to process images
You can upload images.
How can I keep the size of the uploaded image below KB each time?
Can I only change the image size?
In fact, what is the relationship between the Pixel, size, and definition of the image ..
------ Solution --------------------
Yes. The size will be affected.
------ Solution --------------------
Control the compression ratio. if some images have too many pixels, scale down to a specified ratio may not be less than 200 KB, so you need to control the optimal proportion of the maximum size of the uploaded image to k...
------ Solution --------------------
From the popular image collection devices, 200 K is just a normal stamp.
Definition refers to the pixel Prime used to indicate a target of a known size. of course, the more clear the target
For example, the hair diameter is about 70 ~ Between 100 μm
You use a pixel representation, so it's just a thin line
If you use 100 pixels, you will be able to see the scales on the hair.
------ Solution --------------------
The relationship between pixels and image size is the relationship between units and population.
The relationship between pixel and image file size (in bytes) is described in #2.
A 1/6x250 pixel lossless full color (24bit) image is k plus the file header. jpg (non-jpg2000) is about k lossless.
The reason is that jpg has a multi-level compression rate and the color value of each pixel is also affected. Therefore, the number of bytes is not fixed.
24-bit sampling is used for the same pixel "Kaleidoscope" and pure color images. The two are lossless images with the same number of bytes, but the latter in jpg format is much smaller.