01-09-2010 10:25 AM
Hi, all
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.
br
01-09-2010 02:21 PM - edited 01-09-2010 02:22 PM
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?
01-09-2010 03:09 PM
you can look inside the code of "Read BMP Header Info.vi". 16 bits is not a supported BMP bit depth.
Supported depths are 1,4,8, 24, 32.
01-09-2010 08:03 PM
01-09-2010 09:36 PM
hi, Person,
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.
Thanks.
01-09-2010 09:37 PM
Hi, altenbach,
Do you know whether there is a way to resolve this problem?
thanks.
br
01-09-2010 11:22 PM
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.
01-10-2010 12:22 AM
mmm2006 wrote: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. 😉
01-10-2010 12:57 AM
Hi, Perosn
thank again.
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?
Thank.
01-10-2010 11:25 AM
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.
Ton