LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble creating bitmap

Using LV2010 on W7 64 bit.  I have a 2 dimensional data array holding pixel information to create a bitmap.  Now, I'm trying to put together the header information.  The problem I'm having is that the header information is made up of all different sized numbers and I need to convert the values to byte arrays.  A clumsy way of doing it would be to break each value apart into the bytes that make it up, then put it together as an array.  I hate this idea and I have to believe there's a better way to do it.  Any thoughts?  Thanks.

0 Kudos
Message 1 of 3
(2,343 Views)

If the header information is a string, you can convert the string to a byte array, and then Decimate 1D array, and join the two arrays with Numeric/Data Manipulation/Join Numbers.

 

You can also try casting your values.  Since I don't know what your header looks like, this is the best I can do.  When you say bitmap, are you saying that you want to create a .BMP file, or are you simply displaying pixel data?  If you need to store information with an image, and have the vision toolkit, you can use PNG, instead of BMP, and store any data you like with the image.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 3
(2,311 Views)

Got it working, thanks.

 

0 Kudos
Message 3 of 3
(2,300 Views)