imfinfo
Information about graphics file
Description
returns
a structure whose fields contain information about an image in a graphics
file, info
= imfinfo(filename
)filename
.
The format of the file is inferred from its contents.
If
filename
is a TIFF, PGM, PBM, PPM, HDF, ICO, GIF, SVS, or CUR file containing more than one image, theninfo
is a structure array with one element for each image in the file. For example,info(3)
would contain information about the third image in the file.
Examples
Input Arguments
Output Arguments
Tips
When you use
imfinfo
to get information about an Adobe DNG file, it returns the image dimensions of the preview image in the'Height'
and'Width'
fields of theinfo
structure.When you use
imfinfo
to get information about a BMP file, it returns aninfo
structure that can contain a negative'Height'
value. The negative value indicates that the origin of the image is in its upper-left corner. In such cases, the actual height of the image in pixels is the absolute value of the'Height'
value.