03-19-2014 10:36 AM
Hello,
i try to convert 2d array of float to BMP file but it doesn't works. the error is invalid format.
thanks for your help.
03-20-2014
04:48 AM
- last edited on
12-15-2025
12:00 PM
by
Content Cleaner
Hello,
This link could be helpful for you but it is in French:
http://digital.ni.com/public.nsf/allkb/6DA98CB6E708F1A586257177004BC60B?OpenDocument
------------------------------------------------------------------------------------------------------------------------------------------------------------------
The English version says:
Document Type
OK for Web
Title
Converting 2D Arrays to Grayscale Pictures Without IMAQ VIs
Problem
How do I convert a 2D array of pixel values into a grayscale image in LabVIEW if I don't have NI-IMAQ or the Vision Development Module?
Solution
You can use the Flatten Pixmap VI to convert the 2D array. This VI is available in the Graphics Formats Palette, which comes with LabVIEW Full and Professional Development System but not the LabVIEW Base Package.
The example program attached below demonstrates how to convert a 2D array into an 8-bit or 24-bit grayscale image and then save it as a JPEG image, as explained in the following steps:
Note: All of the VIs mentioned above can be found in the LabVIEW Functions palette under Programming » Graphics & Sound » Graphics Formats or Picture Functions.
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Other link helpful:
https://forums.ni.com/t5/Example-Code/Convert-Array-to-Image/ta-p/3527181
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019N3USAU&l=en-US
https://forums.ni.com/t5/Example-Code/Convert-PNG-or-JPG-to-BMP-file/ta-p/3526504
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019M7zSAE&l=en-US
Regards
Samuel G. | GEMESIS
Certified LabVIEW Architect
Certified TestStand Developer