How can I read the X and Y DPI information from an image using Matlab?
imfinfo doesnt seems to supply this information.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not all images have resolution information. It contained in EXIF (Exchangeable Image File Format) tags. Only JPEG and TIFF files may contain EXIF, it usually supplied by digital camera or scanner. If it’s there you can get it from IMFINFO output.
You can always check if those fields exist:
UPDATE:
As for BMP files, they have
HorzResolutionandVertResolutionproperties that represent resolution in pixels per meter according to BMP format standard. You can multiply those values by 0.0254 to get DPI (approximately).