Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How must I read the "CopyBuffer" variable when it points to a color image?

  Hi,
 
  I'm looking some samples to acquire images from Visual C++ 6.0 and I have some questions.
 
  I see that the "CopyBuffer" variable (at ImaqThread function from LLGrab.dsw proyect) is pointing to the memory direction where image's pixels starts. Well, when I capture color images I see that each pixel has 4 bytes, but I don't know what is the format that it's using.
 
  I would like to know which byte of the pixel matches to R, which byte matches to G, which byte matches to B, and what means the 4th byte. 
 
  I would appreciate your answer,
  Thanks!!!
 
 
0 Kudos
Message 1 of 3
(3,725 Views)
Hi Gare,

Based on the NI Vision Concepts Manual (see page 1-4), that 4th byte is the alpha plane, which is a channel used to code extra information (such as gamma correction, transparency, etc.) about a color image.  However, this value is typically not used for RGB representation.  In big-endian format (most significant bit to least), the order of the bytes for a four-byte RGB pixel is: alpha (not used), red, green blue.

Hope this helps,
Irene Chow
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,713 Views)

  Thanks, Irene!!! Smiley Happy

0 Kudos
Message 3 of 3
(3,711 Views)