LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

make a BMP from a table

I would like to create a BMP image from a 2D table of integer (from 0 to 255). I know there is a function that transforms the 2D table putting all it's elements in line and after another function that converts the line in BMP but it doesn't work: the BMP images I get are always black!!

am I making some mistake?
is there other way to transform my table in a BMP?

I'll wait for any answers

Thanks

Matteo
0 Kudos
Message 1 of 4
(2,964 Views)
right click on the 2D table/array and select "Create >> Invoke Node" or "Invoke Node" and then "Get terminal image". Make sure the color depth is at leat 8. Then save the image data to bmp file using the vis from the "Graph and Picture" pallette.

-Joe
0 Kudos
Message 2 of 4
(2,957 Views)
Matteo,
I think you are looking for the "flatten to pixmap", this is not in the base package of labview however, which version of LV are you using?. This VI will take your byte array and create an approperate pixmap structure that can be shown on the picture control or sent to the write to bitmap vi if you want it in bitmap format. This vi is nice it will find the rect of the image, and it can take 4, 8 and 24 bit arrays to format into a pixmap structure, hope this is what you needed.
-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 4
(2,945 Views)
One additional node, if you are not using 24-bit RGB you should provide a color table to the colors array input. this will map your 255 values to an RGB value, if this is not setup all colors might be getting mapped to black independent of the value you pass.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 4
(2,942 Views)