Iread_image

[ XITE Reference Manual | XITE home ]

Name

Iread_image - read a BIFF image from file

Syntax

 #include <xite/biff.h>

 IMAGE Iread_image( char* filename );

Description

Read an entire image (currently not block data!) from file into image. filename may contain "~" (tilde) which will be expanded to the appropriate user home directory before searching for the file.

filename may be "-n", n beeing an integer, meaning that the image should be read from channel n. Use "-0" or empty file name to read from stdin.

The file name may be followed by one or more band specifications. Each band specification is either a band number or a band number followed by a "-" followed by a band number. The last type stands for all bands in the interval, including the two given ones. The band specifications are separated by ":", and there is a ":" between the file name and the first band specification. Examples:

 mona.img            (meaning all bands)
 mona.img:1          (meaning only band 1)
 mona.img:3          (meaning only band 3)
 mona.img:1-3        (meaning bands 1,2,3)
 mona.img:3-1        (meaning bands 3,2,1)
 mona.img:2:3-1:3    (meaning bands 2,3,2,1,3)

Restrictions

The file should exist and have read access.

See also

Iread_band(5), Iwrite_image(5), Iopen_image(5), Iclose_image(5), Init_image(5)

Return value

The image if ok, otherwise NULL.

Author

Tor Lønnestad, BLAB, Ifi, UiO