LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting string data to jpeg

Dear all,

 

Iam getting a image as shown below

63166305.jpg

actual image is clear ..

im having a txt data as attached below.

and please suggest me is there any code to get clear image if it s there please attach here.

 

 

 

thank you,

Muniraju M

 

 

 

 

Download All
0 Kudos
Message 1 of 24
(4,387 Views)

Why are you storing an image as a txt file..? That's likely your issue.

 

The picture you attached is exactly the picture you included in the body of your post. Do you have the original image to share?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 24
(4,378 Views)

The convert EOL on the write is probably one issue, it converts all /r/n to something native, which could be some of the bytes in the file.  Right click the write function and turn this off.  You may also want to try to use the Write Binary file instead, but if you do this, make sure the prepend array or string size to a false constant.

Message 3 of 24
(4,373 Views)

actually can you tell how to save in binary format..????

0 Kudos
Message 4 of 24
(4,360 Views)

There's a VI called Write to Binary File next to the Write to Text File VI that you're already using.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 24
(4,348 Views)

There is 'write to binary file' in the File I/O palette, right next to the 'write to text file'.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 24
(4,343 Views)
If you turn on Context Help, the names of the functions are very visible.
0 Kudos
Message 7 of 24
(4,339 Views)

actually i am getting a fragment string data for every 1 second or something after that i want to reconstruct it as a image file.

can any one suggest me.

0 Kudos
Message 8 of 24
(4,335 Views)

Yes I'd suggest posting more details, more code, more data, more information.

Message 9 of 24
(4,305 Views)

@muniraj wrote:

actually i am getting a fragment string data for every 1 second or something after that i want to reconstruct it as a image file.

can any one suggest me.


How are you getting it? Where does it come from? What does the string represent? How do you know when you have all data for the image?

 

If the fragment is just a part of an image file, you could just blindly stream the data to disk in binary format, then read it as an image once all data is present.

0 Kudos
Message 10 of 24
(4,285 Views)