Setting the max file size for RESULT picture

See all posts Reply

Setting the max file size for RESULT picture new!
by Douglas, 13 years, 5 months ago
Hello again,

I'd like to have my pictures resized to 100 KB, 512 KB, 1 MB, etc.

Is it possible to tell the Upload-class the maximum size for the result pictures so widths/heights getting set automatically?

Regards

DouglasReply
Re: Setting the max file size for RESULT picture new!
by colin, 13 years, 5 months ago
It is possible to set a maximum file size for JPEG images, using the setting jpeg_size. The JPEG quality will be calculated so that the file size doesn't go over the maximum value.

However, it is not possible to calculate the image dimensions in order to achieve a precise size. This would require too much calculations, and could't fit in the class as it is now.Reply
Re: Setting the max file size for RESULT picture new!
by Douglas, 13 years, 5 months ago
Oh, I see. I was trying to avoid to the jpeg_size because i didn't want to have any quality loss.

Thanks anyway.Reply