image resolution

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kpraman
Forum Contributor
Posts: 172
Joined: Fri Oct 13, 2006 10:54 am

image resolution

Post by kpraman »

Hello,

How to get image resolution in PHP?

I tried using getimagesize(). It gives only width and height in pixels.

Thanx
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

What do you want? To determine the size of an image or the size of the screens resolution?
kpraman
Forum Contributor
Posts: 172
Joined: Fri Oct 13, 2006 10:54 am

Post by kpraman »

I have to give the details of images for press. It should be in dpi
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

There's no such thing as DPI in digital images. What you're asking for doesn't exist.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

JPEG and TIFF headers have DPI. If memory serves so does PNG.. but they're useless as at press-time it's most often overridden by the layout editor.

The exif extension may be useful..

... which reminds me, I need to put together a class to read XMP sometime..
Post Reply