Accessing an Image Buffer

This example shows the how to handle image buffers.

The program can be found in the %TOPLEVEL%\Samples\VC\Pixelformat directory. In order to run the program, open the solution file Pixelformat.sln in this directory and select Build -> Build Pixelformat in the menu. You can then execute the program by clicking Debug -> Start.

Available Data Formats

Y800

The Y800 color format is an 8 bit monochrome format. Every pixel is represented by one byte. The organization of the pixels in the image buffer is from left to right and top down. In other words: The first byte of the image buffer corresponds to the first pixel of the first line of the image.

Y16

Y16 is a 16-bit grayscale format. The organization of the pixels in the image buffer is from left to right and top down.

RGB24

RGB24 is a 24 bit color format. Every pixel is represented by 3 bytes, while every byte of this triple corresponds to one color value. The letters 'RGB' mean Red, Green and Blue, so one byte represents the red value, one byte represents the green value and the last byte represents the blue value.

RGB32

RGB32 is a 32 bit color format. It is like RGB24, except that every pixel has an additional byte to store an alpha value. An alpha value describes the transparency of the pixel. Therefore, every pixel consists of 4 bytes. RGB32 is also referred to as RGBA, where the A stands for Alpha. The A value is not used in IC Imaging Control and is therefore always 0. As for the RGB24 pixel format, IC Imaging Control uses the BGRA byte order for the RGB32 pixel format. The organization of the pixels in the image buffer is from left to right and bottom up.

RGB64

RGB64 is a 64 bit color format. It is like RGB32. Every pixel consists of 8 bytes. As for the RGB32 pixel format, IC Imaging Control uses the BGRA byte order for the RGB64 pixel format. The organization of the pixels in the image buffer is from left to right and bottom up.

UYVY

The UYVY color format is basically a 16 bit color format. In contrast to the RGB formats, it contains no values for red, green or blue. It uses values for luminance and chrominance instead. Y stands for the luminance. U (or Cb) and V (or Cr) describe the chrominance. For further details refer to the following link:

<< Programmer's Guide