would exif work ? or maybe the binary jhead would work, it gets information out fo jpeg files , but they maybe have to be generated only from digital cameras i dont know.
>===== Original Message From "Juan Antonio Ruiz Zwollo" <[EMAIL PROTECTED]> ===== >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 > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php