LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Image Data (24bit bmp) from invoke note to imaq image format

Solved!
Go to solution

Hi,

 

I will manipulate a LV-plot bitmap (24bit) by Vison Toolkit functions (Insert a small bmp into a large bmp)

I found only the easy but unattractive solution to write a bmp.file and read it again by the Toolkit functions.

Does anyone has an idea how the different data types of the broken wires could be converted?

 

Create 

 

Thanks 

 

 

0 Kudos
Message 1 of 5
(4,767 Views)

You need to use the Unflatten Pixmap vi (Graphics & Sound >> Graphics Formats >> Unflatten Pixmap) to convert the data to a 2D array.  Then you need to use the IMAQ Array to Color Image (Vision and Motion >> Vision Utilities >> Color Utilities >> IMAQ ArrayToColorImage) to convert it to an U32 RGB image type.

Randall Pursley
0 Kudos
Message 2 of 5
(4,756 Views)

Dear Randall,
thank you very much for your hint, but I get an error:
Error -1074396080 occurred at IMAQ Array To Image Invalid image type.
I assume that this is caused by the different data types. The Input of "Array To Image" requires U16, but the output of "UnflattenPixmap" is U32.
See attached pic in step mode.
Do you have an idea?
Thanks
Frank

0 Kudos
Message 3 of 5
(4,746 Views)
Solution
Accepted by topic author FraRue

ArraytoImage is the wrong vi to choose. You pixmap data is for 24-bit images (RGB). You must use the IMAQ ArrayToColorImage (Vision and Motion >> Vision Utilities >> Color Utilities >> IMAQ ArrayToColorImage) for conversion.

Randall Pursley
0 Kudos
Message 4 of 5
(4,740 Views)

Thank you very much. A small but important difference.

0 Kudos
Message 5 of 5
(4,735 Views)