LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BMP to binary & write bmp on MacOSX

Solved!
Go to solution

Hi everybody 🙂


I have two questions for you !

 

First, I need to convert a bmp file into binary.

What i'm supposed to do is : open the bmp fil with a file dialog, unflatten it to use it for other stuffs (convert to greyscale, use a median filter etc), and after modifying it, i would like to save it. So I used the flatten pixmap vi then de write bmp file vi. But here is my problem : it still write the new file into txt, and not bmp ! 😕

Second question : I would like to convert the same bmp file into binary. I know how to go from binary to bmp but not the inverse.

Any help 🙂 ?

Thanks for all !

Valentine

(If you need more information, just tell me !)

0 Kudos
Message 1 of 6
(2,860 Views)

Explain how you have done for saving the bmp file to binary file. Post a snippet of your code

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 6
(2,856 Views)

Oh god i'm so sorry, i made a mistake in my explanation :
First problem is how to save the modified bmp-file in a new bmp file
and second problem is to convert the same bmp file into binary !

So sorry for the misunderstanding!

0 Kudos
Message 3 of 6
(2,854 Views)
Solution
Accepted by topic author VGans

Converting simply a file that is in a specific location means you can follow the code shown below

 

 bmp file to binary.png

 

But am not sure about the MacOSX.

-----

The best solution is the one you find it by yourself
Message 4 of 6
(2,849 Views)

Thanks a lot ! 🙂

It's what i needed !!

0 Kudos
Message 5 of 6
(2,844 Views)

Hell VGans,

 

In the example provided I see that a sequence structure is being used.

In this case however you could just remove it, because it doesn't seem to serve a purpose.

 

Please also check this link about when to (and when not to) use sequence structures:

http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/avoid_overusing_sequence_structures/

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 6
(2,832 Views)