10-04-2013 04:59 AM
Hi there,
I'm given a jpeg-equivalent hex code and want to convert it to the corresponding jpg-image in labview. The thing is that jpeg uses a specific compression&data format, meaning that it'd be hard to write it from scratch. Does anyone know if there's a driect (or indirect) way to convert the hex code?
10-04-2013 08:00 AM
Pardon my naivete about images, but if it is really "jpeg-equivalent hex code", isn't it already translated to jpeg format? Couldn't you just save it to a file, end the file name in .jpg, and view the file as you would normally?
If not, please ignore this message. It seemed like a real quick experiment, anyway.
Cameron
10-04-2013 09:52 AM
I'm also looking for clairification. Do you mean you have a byte stream of a jpeg image and you want to display it in LabVIEW?
If so you could use the .NET picture control and give it this buffer stream, then save that stream to a PNG then use the PNG to LabVIEW data function.
But I think this is all silly. Where do you get your byte stream from? A file? Then just use the Read JPEG File VI on the palette.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-04-2013 10:12 AM
Okay I figured I would post an example.
Attached is a VI where you provide a JPEG file and it will display it the easy way in LabVIEW by just opening and displaying it. Then there is the hard way where it will open it with .NET, then resave it to a PNG, then LabVIEW will open the PNG to display it. If you really have a byte stream and not a file then this is the way to go. I also threw in the .NET Picture Box display which works with the byte stream we opened. Saved in 2011
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord