SIP Toolbox
imfinfo - Image file information
Calling Sequence
- info = imfinfo(filename)
- info = imfinfo(filename, 'verbose')
Parameters
-
filename:
A string, the image filename to be described. The extension determines the type of the image.
-
'verbose':causes imfinfo to print image
description on the screen.
-
info:
A structure (Scilab typed list) containing the descriptions
under each of the following fields:
-
FileName:
a string
-
FileSize:
measured in bytes
-
Format:
"JPEG", "TIFF", "GIF", "BMP", etc.
-
Width:
number of columns
-
Height:
number of rows
-
Depth:
bits per pixel
-
StorageType:
"truecolor" or "indexed"
-
NumberOfColors:
size of the colormap. Equals to zero for
truecolor images
-
ResolutionUnit:
"inch" or "centimeters"
-
XResolution:
number of pixels per ResolutionUnit in X direction
-
YResolution:
number of pixels per ResolutionUnit in Y direction
Description
imfinfo is used to get a description from image files, without reading the pixels into memory. A structure (Scilab typed list) is returned with the information, which can be accessed by their names (e.g. info.Depth, info.FileSize, ...). The 'verbose' option causes the description to be printed in an organised manner.
Examples
initial_dir = PWD;
chdir (SIPDIR + 'images');
info = imfinfo('example.png'); // reads information into a tlist
info.Depth // members are accessed by name
info.StorageType
imfinfo('example.png','verbose'); // pretty-print description
chdir(initial_dir);
Authors
-
Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>
Availability
The latest version of the Scilab Image Processing toolbox can be found at
http://siptoolbox.sourceforge.net
See Also
imwrite, imread, imshow,