|  | VISION Documentation (LDV) |  | Last update: 01/10/00
Download documentation | 2. ESSENTIAL NOTIONS |

2.1 Images formats

I cannot explain here the bit to bit encoding of an image. Roughly, for a number of plans up to 8, a pixel is associated to a colour index in a palette. Thus, this index points to the true colour of the pixel. Starting with 15 plans, we are in True Color, i.e., each pixel is associated with its colour value (thus with 15, 16, 24 or 32 bits). While in True Color, it's fairly easy, in palette mode (bit-plane) it becomes quickly complex, because each pixel has one of its bits coded in a 16 bits word. This bit should be searched, the different bits from one pixel should be put together, etc... This becomes quickly tiring and, to be fast, this requires assembly optimisation. Thankfully, VISION proposes functions to simplify your work with VAPI.

VISION's LDVs can work in any of the 3 following formats (note that there is no interesst for your LDV to handle the 3 formats, VISION will transmit the required format):

- Standard format
- ATARI format
- Specific format

This little table specifies these different formats ((R = Red, G = Green, B = Blue):

Format | Number of bits / pixel | Description
Standard | 1, 2, 4, 8 | Standard format defined by ATARI. The pixel planes (16 pixels) are following each other. In True-Color, this format maybe exists, but I prefer not to know!
ATARI | 1, 2, 4, 8 | ATARI bit-plane format. Very classical, this is the format of ST-Low, ST-Medium and ST-High, then, by extension, the format of Falcon's bit-plane modes. Contrary to Standard mode, planes are interlaced ((Plan0 - Plan1 - Plan2 - Plan 3, for instance for 16 colours))
| 16 | FALCON True Color mode. Each pixel is coded in a 16 bits word such as the following: RRRRRVVVVV0BBBBB 15 --> 0 Bit # In fact, the actual encoding is on 15 or 1 pixels. The level of green can be coded on 6 bits (65K) instead of 5 (32K).
| 24 | Sadly VISION does not handle this format!
| 32 | RGB0, R, G, B = red, green or blue component on 8 bits (0...255)
Specific | 1, 2, 4, 8, 16, 24, 32 | Specific to the graphic card. No hypothesis on the bit encoding for a pixel can be made.

As far as possible, use the specific format, because it uses the less memory. If your LDV has only to handle lines and columns, you don't have to pay attention to internal pixel coding, the vro_... VDI functions will handle it.

If you have to handle pixels, I recommand to use the ATARI format, because VISION allows to get very easily the indexes through its VAPI.

The standard format is not very useful, except internally in VISION to display the images correctly. except if you have developed equivalent functions to those proposed in VAPI, I would advise not to use this format.

2.2 Programing

You have to know how to program in C! Normally, LDVs do not depend on the compiler (I did my best but, as I use only Pure C, I cannot be really sure).

You have to be fluent in C and not be afraid of handling pointers on structures and functions.

If you know LDGs, this will be useful but it is not mandatory, the LDV skeleton hides them fairly well.

|  | VISION Documentation (LDV) |  | Last update: 01/10/00
Download documentation | 2. ESSENTIAL NOTIONS |