imfinfo - image file information |
info = imfinfo(filename) info = imfinfo(filename, 'verbose') |
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 |
need no comment. |
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. |
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. |
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); |
In theory, imfinfo will work with any raster image format. In practice, it has been tested only for BMP, GIF, JPEG, PNG, PCX, TIFF, XPM, and MIFF. imfinfo will probably work with other formats, but in this case have not been tested by the developers of the SIP toolbox. |
Images are stored in double precision matrices. Hopefully, the next release will make usage of integer types. |
Ricardo Fabbri <rfabbri@if.sc.usp.br> |
The latest version of the Scilab Image Processing toolbox can be found at |
http://siptoolbox.sourceforge.net |
imwrite, imread, imshow |