I want to display bmp in labview. I use function: draw image from File in OpenG library.
But i report error because this is Unsupported image depth. My bmp is 16 bit depth.
Should i conver it to other supported bit depth? there are so many files. Anyone can tell
me how to resolve this problem? Thanks very much.
attached my bmp file.
All you need to do is use the Read BMP File and Draw Unflattened Pixmap VIs.
Does this work for you or why are you trying to directly use the OpenG library?
thank you firstly.
But in my side, your code don't work, the error happen after exit from read BMP File vi.
Did you use the original.bmp to test?
I want to display these bmp without converting, because they come from digital oscilloscope.
so please help me about it.
I apologize, I was just looking at the converted.bmp file and have to eat my words That function does throw the error about the 16-bit bitmap file.
What you could use is the NI-IMAQ driver which is part of Vision Acquisition Software. You can use the IMAQ ReadFile function and display it as shown below. This WAS tested with original.bmp and was displayed correctly. It's not part of core LabVIEW but does do what you're looking for.
Do you know whether there is a way to resolve this problem?
All the subVIs of the bmp read function are fully exposed, so it would just be a matter of reading up on the bmp specs, adaping the code accordingly, and saving the resulting code under a new name. I don't know how much effort this would take and if there would be problems.
I have not tried this, but since Alex said that the vision drivers support 16 bit BMPs, that's probably a less painful way to do all this. 😉
just one question. For vison acquistion software, is it related with hardware?
I mean if i don't have any related hardware, can i use it in my program?
For vision you will need a seperate license.
Here's a VI that will read 16 bit images. However the colors for 16 bit color are ambigious. So you will need to tinker with the colors.