jpeg_size

See all posts See thread Reply

Re: jpeg_size new!
by michel, 16 years, 10 months ago
YOU WROTE :
What images give you a 150Ko size?

------------------------------------------

Very difficult to to say : some respect the jpeg_size rule and some never do that. Why ?Reply
Re: jpeg_size new!
by colin, 16 years, 10 months ago
Basically, the class tries to compress the images with a quality of 25, 50 and 75, and then calculates the rapport between the resulting file sizes and the wanted size, attempting to find the best quality to match the wanted size.

So if the three attempts are not linear, its estimation may be off, thus resulting in a wrong quality and filesize. If you could send me examples of the pictures that get it wrong, as well as your settings, I can try to tweak the code.Reply