Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

XTIF-LOAD-TIFF-FILE

source files: xtif.[ch]

SYNTAX

(XTIF-LOAD-TIFF-FILE "myfile.tiff")

DESCRIPTION

This call accepts an ascii string and loads the .tiff (Tagged Image File Format) file with that pathname. The result is a two-dimensional (rows columns, origin at lower-left) graphic-relation containing :PIXEL-RED, :PIXEL-GREEN and :PIXEL-BLUE arrays of CLASS-UNIT-FLOAT-ARRAY. The result graphic relation may be displayed on the screen using the :PIXEL-RELATION keyword to the :DRAW <camera> message (which see).

The XTIF-LOAD-TIFF-FILE function is implemented using sam@sgi.com's libtiff.a library, and can read a wide variety of .tiff files, including monochrome, colortable and RGB images, compressed or uncompressed, although the .TIFF "standard" includes so many options, and is so irregularly implemented, that you may still encounter .tiff files you cannot load.

All files which can be loaded will be returned in the above :PIXEL-RED/GREEN/BLUE format. Yes, we use 24 bits to represent 1-bit deep images :). This is partly because this is an RGB-oriented package, and partly to minimize the number of cases xlisp applications need consider. You may remove the :PIXEL-RED and :PIXEL-BLUE (or any two) arrays of monochrome images to save space, if you wish (or set them to the remaining array), the image will draw just the same. XTIF-LOAD-TIFF-FILE does *not* do this optimization on it's own, to avoid surprising innocent application programmers.

XTIF-LOAD-TIFF-FILE currently ignores any alpha information present in the input file, because that is what libtiff does.


Go to the first, previous, next, last section, table of contents.