06-18-2011 09:05 AM - edited 06-18-2011 09:09 AM
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
06-18-2011 09:17 AM
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
06-18-2011 09:26 AM
oo thaaaanks alot
06-30-2011 08:26 AM
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.
06-30-2011 09:31 AM - edited 06-30-2011 09:32 AM
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).
06-30-2011 11:00 AM
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.
07-14-2011 09:01 AM - edited 07-14-2011 09:02 AM
Hijacking the thread...
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.
07-24-2011 02:34 AM
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
07-24-2011 04:40 AM
Thank you very much, I will test. I'm on holiday now, though, so it will take a few weeks.
Best, Enrico
12-06-2013 01:07 AM
Hello everybody
i'm french and i work with CMUCAM4 and i need help about string to image