Open main menu

Difference between revisions of "AGI/Specifications/View"

m
colour -> color
(Wikify and fill in differences from SGML. Work complete)
m (colour -> color)
 
Line 73: Line 73:
===Cel data===
===Cel data===


The actual image data for each cel is stored using RLE (run length encoding) compression. This means that instead of having one byte for each single pixel (or 1/2 byte as you would use for 16 colors), each byte specifies how many pixels there are to be in a row and what colour they are. I will refer to these groups of pixels as "chunks".
The actual image data for each cel is stored using RLE (run length encoding) compression. This means that instead of having one byte for each single pixel (or 1/2 byte as you would use for 16 colors), each byte specifies how many pixels there are to be in a row and what color they are. I will refer to these groups of pixels as "chunks".


This method of compression is not very efficient if there is a lot of single pixels in the image (e.g. a view showing static on a TV screen), but in most cases it does save a fair amount of space.
This method of compression is not very efficient if there is a lot of single pixels in the image (e.g. a view showing static on a TV screen), but in most cases it does save a fair amount of space.


Each line (not to be confused with a chunk) in the cel consists of several bytes of pixel data, then a 0 to end the line. Each byte of pixel data represents one chunk. The first four bits determine the colour, and the last four bits determine the number of pixels in the chunk.
Each line (not to be confused with a chunk) in the cel consists of several bytes of pixel data, then a 0 to end the line. Each byte of pixel data represents one chunk. The first four bits determine the color, and the last four bits determine the number of pixels in the chunk.


Example: AX BY CZ 00
Example: AX BY CZ 00
Line 83: Line 83:
This line will have:
This line will have:


* X pixels of colour A (AX)
* X pixels of color A (AX)
* Y pixels of colour B (BY)
* Y pixels of color B (BY)
* Z pixels of colour C (CZ)
* Z pixels of color C (CZ)
* (then that will be the end of the line) (00)
* (then that will be the end of the line) (00)


2,051

edits