ImageGear for C and C++ on Linux v18.8 - Updated
SGI
User Guide > File Formats and Compressions > File Formats > File Formats Reference > SGI

Full Name SGI (Silicon Graphics Image)
Format ID IG_FORMAT_SGI = 38
File Extension(s) *.sgi, *.bw, *.rgb, *.rgba
Data Type Raster Image
Data Encoding Binary
Color Profile Support No
Multi-Page Support No
Alpha Channel Support Supports single alpha channel for read and write.
ImageGear Platforms Support WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC

ImageGear Supported Versions:

N/A

ImageGear Supported Features:

ImageGear Read Support:

ImageGear Write Support:

ImageGear Filter Control Parameters:

None

Comments:

This format was developed for use with the SGI image library included on most Silicon Graphics computers. Most SGI images are black and white.

The major components of an SGI file are the 512-byte header, a "scan-line offset table", and the bitmap header. SGI is one of the few formats to use a scan-line offset table.

The fields of the header structure include a compression flag (1 = compressed), the height and width (in pixels) of the image, the number of bit planes, the highest pixel value and the lowest pixel value, the name of the image, and pixel format. Pixel format can indicate the number of color channels, whether the image is dithered to a single channel, and whether the bitmap image is actually a color map for other images.

The bitmap data is stored up-side-down-the first scan line is at the bottom of the bitmap. If the data is RLE, a scan-line offset table is present, following the header and preceding the bitmap. This increases compression further by allowing repeated offsets to the same scan line, if several scan lines have the same value. A grayscale image may even refer to the same scan line from three different bit fields. For this reason, and because SGI data that is compressed can be stored in any scan-line order, the offset table must not be ignored.

References Used

Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats, 2d ed. Sebastopol, CA: O'Reilly & Associates, Inc., 1996.