LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bmp to 2D Array

Hello
 
I'm trying to convert an bmp-File into a 2-d array which should conatin the values of each pixel. I created this VI but it doesn't work. Could somebody tell me why not?
 
Thanks
 
Simon
 
PS: I succesfull created the opposite. A VI which creates a bmp out of a 2d array. Now I failed to do it vice versa 😞
Using Labview 7.1
Download All
0 Kudos
Message 1 of 5
(7,068 Views)
You are writing a 24 bit pixmap, but then try to read a 8 bit pixmap. The two must match.
 
(You should also try to use the correct datatypes)

Message Edited by altenbach on 07-26-2006 10:05 AM

Message 2 of 5
(7,063 Views)
Simon,

Your VI works for me. Are you sure the .bmp file you are trying to read has 24-bit data? Put an indicator on the image data cluster coming from the Read BMP File VI and see what it says. Also check the error out cluster to see if any errors are reported. I used the file at LabVIEW 8.0 >> Examples >> General >> dragdrop >> 0.bmp as a test file.

Lynn
Message 3 of 5
(7,055 Views)
Sorry, I was in a hurry and wrote it backwards.
 
You are writing an 8 bit image, but read it as a 24 bit image. Check the connectors.
0 Kudos
Message 4 of 5
(7,051 Views)
Yes, now it works. Thank you very much!
Using Labview 7.1
0 Kudos
Message 5 of 5
(7,043 Views)