How does getImageCompressionQuality work?
Posted: 2015-04-06T12:19:25-07:00
Hi there,
I have been using ImageMagick (Imagick) for a couple of days now and it amazes me every day. Now I got to a point in my application where I have to rely on values that come from analyzing an image using $image->getImageCompressionQuality(). It seems to work quite well but I'm curious how it is possible to obtain the compression quality from a file. The images I have to process come from very different sources (exported with editing programs, unedited, somewhere from the internet...) so I need to know how reliable the information really is. I have only tested jpg files as jpg is the most popular format being used in this project.
Therefore my question ist: how does getImageCompressionQuality really work (with jpg)? Is it reading out metadata or does it use quantization tables (like this: http://www.hackerfactor.com/src/jpegquality.c) or a complete different approach?
Thanks in advance.
EDIT: I'm using the PHP api.
I have been using ImageMagick (Imagick) for a couple of days now and it amazes me every day. Now I got to a point in my application where I have to rely on values that come from analyzing an image using $image->getImageCompressionQuality(). It seems to work quite well but I'm curious how it is possible to obtain the compression quality from a file. The images I have to process come from very different sources (exported with editing programs, unedited, somewhere from the internet...) so I need to know how reliable the information really is. I have only tested jpg files as jpg is the most popular format being used in this project.
Therefore my question ist: how does getImageCompressionQuality really work (with jpg)? Is it reading out metadata or does it use quantization tables (like this: http://www.hackerfactor.com/src/jpegquality.c) or a complete different approach?
Thanks in advance.
EDIT: I'm using the PHP api.