LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I decode a data stream to jpeg image?

Solved!
Go to solution

i have used the same ASCII image data Noric has used in his "JPEGtpPict discussion colour bit.vi"  and the data you used in ur "StringToImage.vi" . the resulting picture is grumbled and not clear Smiley Sad

0 Kudos
Message 21 of 31
(3,057 Views)

You need to turn off the "Convert End Of Line" switch on the write text file.vi

 

Right click on the write to text file.vi and toggle the switch 🙂

 

Craig

LabVIEW 2012
Message 22 of 31
(3,048 Views)

oo thaaaanks alot Smiley Happy

0 Kudos
Message 23 of 31
(3,044 Views)

Hi all, I was the same problem without knowing this solution and now it also works for me. I wonder that something so simple (and hidden) perturbed me during 2 weeks. Somebody could explain me the function of "Convert EOL"? I am also still wondering... thanks.

0 Kudos
Message 24 of 31
(3,015 Views)

From the LV help:

This function converts all end-of-line characters to platform-dependent end-of-line characters unless you right-click the function and remove the checkmark next to the Convert EOL shortcut menu item.

So whenever the file read encounters an end-of-line character(s) (CR or LF or CR/LF) it will convert it to the Windows (assuming you're using Windows) EOL characters (CR/LF). When reading binary data byte-wise you'll have a 1/256 chance to hit any of the ASCII characters, so most images will contain CR or LF and they will be converted, destroying your binary data.

That's why you should ALWAYS switch this option off for binary data. Use it only for plain text (ASCII) files, and even then with caution.

(I think the default should be to NOT convert EOL).

0 Kudos
Message 25 of 31
(3,010 Views)

Thank you very much! very useful your help!! I also think it could be the default setting or, at least, to be included in an input more visible to the user.

0 Kudos
Message 26 of 31
(3,004 Views)

Hijacking the thread...Smiley Wink

 

Some VIs to check the timing of cosmin's solution vs. jpeg file read (main is the first). I attach them here because I can't do that within a comment of the community document. Written with LV10SP1, saved as LV8.2.

 

Download All
0 Kudos
Message 27 of 31
(2,965 Views)

Hi Enrico,

after some digging I've got some bits and pieces of the former project. I had to modified it to increase the speed.

Check the new attached 2 dll's in the original document: https://decibel.ni.com/content/docs/DOC-13513

Put them in the same folder and use labjpeg7new.dll instead of labjpeg7. It has the same calling parameters.

test it and give feedback.

 

Cosmin

0 Kudos
Message 28 of 31
(2,944 Views)

Thank you very much, I will test. I'm on holiday now, though, so it will take a few weeks.

Best, Enrico

0 Kudos
Message 29 of 31
(2,938 Views)

Hello everybody

i'm french and i work with CMUCAM4 and i need help about string to image

 
0 Kudos
Message 30 of 31
(2,428 Views)