Hi,
If you have an array of U32 or I32 from a 24 bit bitmap, each byte represent
one pixel. The format is: bit 0-7 B, 8-15 G, 16-23 R, or R and B switched, I
can't remember.
Use two for loops around the 2d data, and use Split Number to split the 32
bit number to two 16 bit numbers, use the same technique to split the two 16
bit numbers into four 8 bit numbers. Three of these numbers are the three
colors.
This doesn't work if the bitmap is 2,8 or 16 bit... For the 8 bit data, each
byte represents an index in the color table, so you can convert the color
table to three colors, and use each index to lookup the color for that
index. Don't know about the 16 bit data, it might be a 5/6/5, 6/5/5 coding
(for R/G/B) or also a color table, with 65536 entrees.
Regards,
Wiebe.
"mepgkas"
wrote in message
news:506500000008000000BD690000-1031838699000@exchange.ni.com...
> I am using Labview 6, and need to read a bmp file and obtain the
> grayscale values in an array to analyse the data. What is the best way
> of doing this.