05-12-2011 03:39 AM
Hello.
I'm trying to generate a JPEG picture from a hexadecimal textfile ultimatly directly from a serial port, and I'm alittle stuck on the execution.
After some googeling I think I've understood that you need to arrange the hexadecimals in an array and then generate the picture.
But doing so only generates a almost black picture with som white dots, so something is very wrong.
Could anyone give alittle heads up to what I may be doing wrong?
I've attached the file with the picture in hex.
Thanks in advance,
ASibbern
05-12-2011 04:34 AM
Hi,
I had the same problem once.
I made a VI that captured a waveform from an oscilloscope. The problem was that during the transmission some extra bits, at the beginning were added.
I did the following:
- changed the capture format to a format that can be easily interpreted (bmp or tiff)
- capture the waveform and compare it to the standard file (from your PC)
- remove extra characters and try it again with jpeg
Personally, I prefer TIFF - because it's easy and fast to read the tags. Capture as tiff and compare what you get with a tiff from your PC. I think that the first information from a tiff is little endian or big endian (search on google how exactly starts tiff or bmp files).
Paul
05-12-2011 04:37 AM
on more thing: write it in binary form not as text.
05-12-2011 04:55 AM
Hi ASibbern,
the attached example shows how it could work. It shows how you can create your image from the txt file. If you show us your code, maybe we will find a simpler solution to write the image directly.
Mike
05-12-2011 05:26 AM
Thank you
I am connected to a JPEG color cam with a serial port,
so the first part is just taking picture.
i wish to stream it like a video