Is there a way of retrieving image resolution with PHP?
getimagesize() only gets the pixel dimensions. I need the resolution or physical size so that I can scale uploaded images to 72 dpi on the assumption that they are 100% actual size.
E.g., An image which is 2" x 2" and 200 dpi would be scaled to 144 px x 144 px.
And an image which is 1" x 1" and 400 dpi would also be scaled to 72 px x 72 px (even though it has the same pixel dimension as the first image).
getimagesize() only gets the pixel dimensions. I need the resolution or physical size so that I can scale uploaded images to 72 dpi on the assumption that they are 100% actual size.
E.g., An image which is 2" x 2" and 200 dpi would be scaled to 144 px x 144 px.
And an image which is 1" x 1" and 400 dpi would also be scaled to 72 px x 72 px (even though it has the same pixel dimension as the first image).