Openlab Raw Format

Technical Note: 344
Reads: 14458
Creation Date: 14/04/2004
Modification Date: 09/11/2004

Openlab Raw files contain a file header at byte zero, and then one ormore image headers followed by image data

Openlab Raw files contain a file header at byte zero, and then one or more image headers followed by image data. All data must be in Motorola byte order.

Openlab Raw files can be read and written by Openlab, Volocity and Phylum.

File Header Format:

Byte

Meaning

0-3

File identifier - 'OLRW'

4-7

Version (currently 1)

8-11

Number of images in the file.

Image Header Format:

Byte

Meaning

0-3

blockID - 'rIMG' in all current files

4-7

blockSize - Size of block including blockID and blockSize

8-11

width - Width of image

12-15

height - Height of image

16

bit depth - Bit Depth (8 to 16 or 32)

17

channels - Number of channels (1 or 3)

18

bytesPerPixel - Number of bytes per pixel

19

flags - Flag byte (currently unused)

20-27

timestamp - a 64 bit signed long, the absolute time the layer was created in microseconds since 00:00 on Jan 1 1904.

28-31

spare - Reserved for future use

32-287

name - Pascal-style length-prefixed string, filled to 256 bytes

288

data - Image data (width*height*bytesPerPixel in size)

Note that the file header plus the image header is 300 bytes, so a single image file canhave all the non-image data removed by removing the first 300 bytes.