2nd Edition
Copyright 1998-2000 Edward
L. Blake
All Rights Reserved
No part of this document may be reproduced in any form, mechanically or digitally, or transmitted or redistributed in any form by any means without the prior written permission from the author, Edward L. Blake. Edward Blake can be contacted at blakee@rovoscape.com
This article is an updated, reformatted, and corrected version of my previous postings on wotsit.org. This article is also better formatted as well.
Disclaimer: Please note that I am not the person, and
I’m not involved with the one(s), who created any of the RAW formats. The
information presented here is at most a description of how to read (hopefully)
some RAW files based on my experimentation and experience.
This
is an easy file format for the developer, but sometimes a nightmare for the
user. :-)
Basically, It's a raw format. There is no predefined
format, not even for Image width and height, nor palettes, etc. The raw format
is basically a type of import/export format rather than a storage format. For
some systems and\or applications it’s a direct dump of the memory section
containing the graphics information. Which means that encoding may depend on
the graphics card memory arrangement itself. When opening a raw graphic format,
the width and height must be specified usually, as well as when the picture
data starts. There's other properties that needs to be specified sometimes. A
raw file could be as simple as a stream of RGB values or as complex as random
numbers as a header file with planar CMYK settings appended afterwards.
There's no standard between image viewers\painters.
Some can write 16-bit and indexed colour graphics, but only read 16-bits or
indexed colours. Some probably support RLE encoding.
RGB is not always the colour information being
recorded in the file, it can also be encoded as grayscale, monochrome bitmap,
indexed colours, CMY, CMYK, HSV, HSB, or even L*a*b models.
Here's
some ways a raw image could be encoded:
RGB
[R
Byte] [G Byte] [B Byte] [R Byte] [G Byte] [B Byte] ...
BGR [B Byte] [G Byte] [R Byte] [B Byte] [G Byte] [R Byte]
...
CMY [C Byte] [M Byte] [Y Byte] [C Byte] [M Byte] [Y Byte]
...
CMYK [C Byte] [M Byte] [Y Byte] [K Byte] [C Byte]
[M Byte] ...
Planar
RGB [R] [R] [R] [R] ... [G] [G] [G] [G] ... [B]
[B] [B] [B] ...
Image
values could also start from the bottom and proceed to the top (like
the Windows BMP format).
Information on many other file formats
Email:
Primary Address: blakee@rovoscape.com