Possible to check quality / compression of a JPEG ?

From: Date: Wed, 26 Mar 2003 23:48:51 +0000
Subject: Possible to check quality / compression of a JPEG ?
Groups: php.general 
Request: Send a blank email to php-general+get-141138@lists.php.net to get a copy of this message
Hello: Is it possible with PHP to check at what quality/compression a JPEG file has been saved? I.e. I have "dummy.jpg" that I got from somewhere else and I want to know with what quality it was saved. The second Note of the User Contributed Notes on the PHP manual regarding the function imagejpeg (http://www.php.net/manual/en/function.imagejpeg.php) mentions such a code, and the user hints that he/she is able to read the quality of a jpeg, but there is no code given (I have tried contacting the user but the comment is quite old): ====================================== "If you call imagecreatefromjpeg and load a jpeg with 75% quality and output it with imagejpeg u can specify the new quality for e.g. 90% and u can increase quality, but output will look like 75% quality picture with the only difference that the new pic is bigger. So u should check the source quality before u alter output quality. In most cases a quality of 75% is sufficient. For previews i use 50%. But i make a check if source quality is lower than my personal output quality, i will not chance source quality ! Hope that helps your Webserver and keeps the traffic low :-)" ====================================== Regards, Juan Antonio

« previous php.general (#141138) next »