LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert image to JPEG and write to TCP

Solved!
Go to solution

I need to convert an image to JPEG and write it to a TCP port rather than to a file.  

 

I thought I could modify "Write JPEG File.vi", but it is password protected.

 

Thanks 

0 Kudos
Message 1 of 5
(9,596 Views)
You can save it to a file and then read the file as a string using the file functions.

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(9,585 Views)

Thanks

 

The delay is probably small, but I was hoping to avoid that. 

0 Kudos
Message 3 of 5
(9,577 Views)
Solution
Accepted by topic author Rick N.

If you using IMAQ Vision, then you can convert your image to compressed string:

Compressing an IMAQ Image Without Saving to Disk

Also this topic might be interesting for you: Decoding JPEG String 

 

Andrey.

0 Kudos
Message 4 of 5
(9,560 Views)
I have not tried this, but you could use ImageMagick from SysExec with the command causing a redirect to stderr, then pull the image as a string from stderr.  There is a host of things that could go wrong, but it is worth a shot.
0 Kudos
Message 5 of 5
(9,529 Views)