I have read a lot about image resolutions and heard that it's not possible to set image resolutions in PHP due to resolution not being too relevant on the net, but my question is:
Is there ANY WAY for me to specify / check image resolution of an image stored on my server so that i can determine whether it's good enough to print / download?
I can work out all the width / height details etc... but resolution seems almost impossible.
I've read everything in the PHP manual that I can think of.
Any suggestions?
Thanks.
Image Resolution
Moderator: General Moderators
You'll need to be a bit more specific. When you say "an image stored on my server" what exactly are we talking about? A jpeg, a gif, a png, a tiff, a psd? Jpeg files can have DPI and print dimensions specified in the file header but they rarely do. Gif and PNG files never do. I'm not sure about tiff files. PSD files do, but the format is secret so it's virtually impossible to get the information out.
If you're handling images that are going to be uploaded by people who you can train to handle them in a specific manner then you may be able to write something to read the image header and get what you need. If you're handling images uploaded by the public then give up now because you'll never get images with proper headers.
If you're handling images that are going to be uploaded by people who you can train to handle them in a specific manner then you may be able to write something to read the image header and get what you need. If you're handling images uploaded by the public then give up now because you'll never get images with proper headers.