How does Openlab work with different image formats?

Technical Note: 24
Reads: 6917
Creation Date: 06/12/1999
Modification Date: 19/08/2005

"Classic" Image Formats

Openlab bases all of its "classic" imaging structures on standard Macintosh QuickDraw structures. These are:

1-bit images. This stores an image in 1 bit per pixel, and can have two states. This format is used for binary images. Usually the image will be black (the bit is ON) or white (the bit is OFF), but the ON state can be assigned a different color in Openlab if desired.

2-bit images. "Four Greys" setting. Supported but has little use in Openlab. 0 is white, 3 is black.

4-bit images. These can be greyscale or color. They are useful for annotation where some color is desirable but memory requirements need to be kept to a minimum. With 4-bit greyscale, 0 is white and 15 is black, with the other greys distributed linearly between the two. The same convention applies to color, but the intermediate colors are determined by a system-provided color palette.

8-bit images. These can be greyscale or color. Each pixel is stored in 1 byte. 0 is white, and 255 is black for both greyscale and color images. For greyscale, the other grey values are distributed evenly over the range. For color, the system provides a standard look up table. Custom look up tables can also be attached to these images, but it should be noted that the convention of 0 = white, 255 = black is normally applicable. Note that this is the inverse of what is typically encountered in other imaging packages. (Some custom color look up tables may reassign black and white).

16-bit color. This format provides 5 bits per rgb color component, leaving one bit per pixel unused, which strictly speaking is a 15-bit color format. In this format, r = g = b = 0 is black, and r = g = b = 31 is white. This format can display 32,768 different colors, but since for greyscale images r = g = b, only 32 different true grey levels exist.

32-bit color. This format provides 8 bits per rgb color component, leaving 1 byte per pixel unused. This format is sometimes referred to as 24-bit color for this reason, but it should be understood to be the same. In this format, r = g = b = 0 is black, and r = g = b = 255 is white. This format can display 16,777,216 different colors, and 256 different shades of true grey.

"Deep Grey" Image Formats

Openlab supports images with more than 8 bits of greyscale data, specifically, 9, 10, 11, 12, 13, 14 and 16-bit greyscale. 15-bit greyscale is not supported for technical reasons. All of these formats assign two bytes per pixel, and adopt the convention that 255 = black and 0 = white. Note that this is the same as the convention for QuickDraw 8-bit greyscale.

The available grey levels for the bit depths are:

9-bit greyscale 512 levels
10-bit greyscale 1,024 levels
11-bit greyscale 2,048 levels
12-bit greyscale 4,096 levels
13-bit greyscale 8,192 levels
14-bit greyscale 16,384 levels
16-bit greyscale 65,536 levels

It should be understood that computer hardware is incapable of displaying greater than 8-bit greyscale data on the monitor. To allow Openlab to display such images, an 8-bit version of the image is created for screen display using a look up table. This LUT can be edited using the "Contrast Enhancement" dialogue.

Openlab permits the use of false-color look up tables on deep greyscale images, but it should be understood that this look up table is actually applied only to the 8-bit representation of the underlying deep greyscale data, and will have no effect on measurements, etc. made on such images.

As deep grey images are non-standard formats not supported by either Macintosh or PC graphics conventions, special processing is required to deal effectively with these images. You should note that some standard Macintosh routines will not function with deep grey data. Most other software packages and file formats will also not understand deep grey images. You are not able to edit deep grey images using the paint tools.