Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69153

Write bmp to binary file issues

$
0
0

Hi,

 

I have a BMP text string I have obtained from a Yokogawa oscilloscope. I can write this file directly to a .BMP but the binary write appends 4 bytes to the beginning of the BMP string that makes it an invalid BMP format. Removing those 4 bytes with a text editor, saving, and reopening the file will make it valid which can be opened by any image viewer.

 

I have also tried the regular write text to file function but it makes the image jarbled, however, does not append the extra 4 bytes as binary write does.

 

And I have tried the recommendation from this post but the BMP file is also jarbled.

http://forums.ni.com/t5/LabVIEW/problems-creating-a-BMP-file/m-p/757714/highlight/true#M347071

 

Here is my VI:

 

bd2.JPG

Writing file with binary write, extra 4 bytes...

 

bytes.JPG

 

I don't see the 4 bytes here in the data string!

 

bytes2.JPG

 

 


Viewing all articles
Browse latest Browse all 69153

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>