09-08-2011 03:21 AM
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
Solved! Go to Solution.
09-08-2011 07:31 AM
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.
09-08-2011 09:50 AM - edited 09-08-2011 09:51 AM
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
09-08-2011 10:00 AM - edited 09-08-2011 10:03 AM
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.
09-08-2011 10:44 AM
Thank you very much. A small but important difference.