LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why colors of snapped image are different from original

Linux 7.3, Labview 6.1. Using Invoke Method: Get Panel Image depth: 24 bit. When write image with Write JPEG file black and white colors are OK the rest of the colors are wrong
0 Kudos
Message 1 of 4
(2,740 Views)
I'm not using Linux, so this is just a wild guess.

Nowadays, most pc use 32 or 16 bit display mode, while
LabVIEW doesn't support these color depth. So when you
want a 24 bit image, LabVIEW will convert the screen color
depth to 24 bit. To avoid this convertion, manually set
your screen display mode to 24 bit.

If you send me a copy of the data you got from Get Panel
Image, I can at least tell you if the data is right or not.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 2 of 4
(2,740 Views)
> Linux 7.3, Labview 6.1. Using Invoke Method: Get Panel Image depth: 24
> bit. When write image with Write JPEG file black and white colors are
> OK the rest of the colors are wrong

I think that this bug is particular to 24 bit visuals that place the RGB
bytes in a particular order. I suspect that all shades of gray are
correct and the other colors simply have their R and B bytes backwards.
So one intermediate workaround is to read out the pixel values and
swap the bytes appropriately. Also, if you can arange for your XServer
or video card to have the visual with the bytes in the other order or
use 15/16 bit color, then this would workaround the problem also.

Greg McKaskle
Message 3 of 4
(2,740 Views)
Switching R and B worked. Thanks Greg.
0 Kudos
Message 4 of 4
(2,740 Views)