Possible Duplicate:
Get/set DPI with PHP GD/Imagick?
Is there a possible way to check photo dpi with php. I have 300 dpi and 72 dpi photos. but wants a way to calculate dpi automatically.
It's too late for me to check now but I think you're looking for Imagick::getImageResolution()
and Imagick::setImageResolution()
if you need to change the DPIs.
I don't think this is possible with GD, I believe it "converts" all images to 72 DPIs.