The Little Guy Posted February 18, 2010 Share Posted February 18, 2010 Hi. I allow users to upload images, the user then is able to adjust several settings for the image: - Image quality (10 - 100) - watermark position(s) (top left/right, middle, bottom left/right) when the user adjusts the quality, the original image is never affected by this change, so he/she can set it to 10, then change it back to 100 if he/she wanted, and the image quality is preserved. Is there a way for me to get the images quality or dpi of the original image? Link to comment https://forums.phpfreaks.com/topic/192544-image-dpi/ Share on other sites More sharing options...
teamatomic Posted February 18, 2010 Share Posted February 18, 2010 Not really, you could make a guess based on width/height vs kb/mb. PHP can read exif info from jpg's but it is not reliable and probably does not contain what you want, varies between camera mfg's and windows can/will sometimes wipe it out on transfer from camera to computer. DPI has no bearing on monitor display, only for gauging/controlling printed size. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/192544-image-dpi/#findComment-1014450 Share on other sites More sharing options...
The Little Guy Posted February 18, 2010 Author Share Posted February 18, 2010 If you check out this image: http://www.nawdog.com/view/8 I have text that reads: Quality Reduced By: 90% is that sufficient enough, or should I say is that the best reading I am going to get? The image that you see there actually has a 90% better resolution than what you currently see Link to comment https://forums.phpfreaks.com/topic/192544-image-dpi/#findComment-1014454 Share on other sites More sharing options...
teamatomic Posted February 18, 2010 Share Posted February 18, 2010 Where does that come from? stored along with the image when it is uploaded and worked over by GD? If it is "good enough" is up to you. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/192544-image-dpi/#findComment-1014513 Share on other sites More sharing options...
The Little Guy Posted February 19, 2010 Author Share Posted February 19, 2010 The image is uploaded, then the user changes the settings for the image, such as image quality, and when the image is reproduced with the GD library, it reads the settings and if it is 10% quality, I just subtract 100 - 10 and get 90% reduced... but I would really like to say what its original quality is. Link to comment https://forums.phpfreaks.com/topic/192544-image-dpi/#findComment-1014633 Share on other sites More sharing options...
teamatomic Posted February 19, 2010 Share Posted February 19, 2010 The original quality of the image the user uploads is probably not going to be available to you. You could collect the exif info for a while and see what you get. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/192544-image-dpi/#findComment-1014638 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.