Changed picture has more bytes than the original one

See all posts See thread Reply

Re: Changed picture has more bytes than the original one new!
by colin, 15 years, 3 months ago
The image is decompressed by the class, and then recompressed. If it is a JPEG, you can change the setting jpeg_quality, which is set to 85 by default.

You may want to use a tool such as ImageMagick identify to compare the two images, and see why the resulting image is bigger in size.Reply
Re: Changed picture has more bytes than the original one new!
by Douglas, 15 years, 3 months ago
Thanks for the info.

Is it possible to "read" the compression rate of an uploaded image so i can use it for the setting jpeg_quality? For instance when I got a jpeg with a compression rate of 70% I don't want the Upload class to make 85% when it creates the result picture.Reply
Re: Changed picture has more bytes than the original one new!
by colin, 15 years, 3 months ago
No, it is not possible to read the JPEG quality setting with which the image has been compressed. See for instance hereReply
Re: Changed picture has more bytes than the original one new!
by MelnykLarysa, 5 months, 3 weeks ago
Thanks, Colin. That makes sense. I was hoping there might be a way to reverse-engineer the quality setting, but I see now it's not stored in the JPEG metadata. Appreciate the clarification and the linkReply