LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i convert 32 bit RGB image to 24 bit?

I would like to convert 32 bit image to 24 bit.
how can i do this in labview? thanks
0 Kudos
Message 1 of 2
(6,481 Views)
Fais,

A 32-bit RGB has an additional Alpha factor in the high byte. To just have a 24-bit RGB, just AND the high byte of the 32-bit number with 0x00 and then you have your 24-bit number inside of a 32-bit shell. This is how LabVIEW stores 24-bit colors.
Here is a strong note: LabVIEW stores RGB as 0x00RRGGBB. Windows stores its COLORREF type as 0x00BBGGRR. If you need your LabVIEW color data to be used by Windows color functions, then you will need to do some byte swapping on the colors first.

Randy Hoskin
Applications Engineer
National Instruemnts
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(6,481 Views)