imfinfo
Gets information from the image, without reading pixel data, using functions defined in the omlimgtoolbox.
Syntax
R = imfinfo(file)
R = imfinfo(file, ext)
Inputs
- file
- Name of the image file.
- ext (optional)
- Specifies the extension to use for the image file to be read. If this option is used, file should be the base name with no extension specified.
Outputs
- R
- The resulting structure with information about the image in file.
R contains the following fields:
- BitDepth
- Bit depth of the image.
- ByteOrder
- Byte order stored. Values are big-endian if bytes are packed with the most significant first, little-endian otherwise, or undefined if it cannot be determined.
- ColorType
- Color type of the image. Values are grayscale for grayscale, indexed if an image indexes into a color map, and truecolor otherwise.
- Comment
- Text, if any, associated with the image.
- Compression
- Compression type, if available.
- DelayTime
- Delay in milliseconds before reading the next image for image formats that support animation.
- DisposalMethod
- Specifies how succeeding frames are rendered for image formats that support animation.
- FileModDate
- Last modification date of the image file on disk.
- FileSize
- Size of the image file on disk.
- Filename
- Absolute, normalized path to the image.
- Format
- Image type.
- Height
- Height of the image in pixels.
- LoopCount
- Number of loop iterations for an animation.
- Quality
- Quality of the image, with values from 0-100, 100 being the highest quality.
- Width
- Width of the image in pixels.
Examples
addtoolbox('omlimgtoolbox')
info = imfinfo('img_4871.jpg');
info
info = struct [
BitDepth: 32
ByteOrder: undefined
ColorType: truecolor
Comment:
Compression: undefined
DelayTime: 0
DisposalMethod:
FileModDate: Tue Jul 11 09:16:24 2017
FileSize: 9055297
Filename: c:\tests\oml\img_4871.jpg
Format: JPEG
Height: 3096
LoopCount: 0
Quality: 99
Width: 3870
]