LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 
Hooovahh

Add Compression Input to LV Image to PNG Data

Status: New

Under Web Services there is a conversion palette.  One of the functions here is to convert LV Image data to a PNG stream.  This is super useful when dealing with sending and receiving large amounts of PNG data over something like websockets.  I've used this in places where a web page can control a VI, and the image of some front panel controls can be sent to the web page.

 

However only recently did I realize this function turns the image into a PNG stream that is completely uncompressed.  This idea is to expose the Compression input to the VI.  Here is just one example where I get the image of a control then represent it as a PNG.  With no compression this file is over 64KB.  With just the most minimum compression that drops to 3KB, and down to 2KB under the highest compression.

 

Example_VI.png

2 Comments
wiebe@CARYA
Proven Zealot

The underlaying LVImageDataToPNGByteArray function is used in Write PNG File. This change can be done in 10 minutes, if the VIs weren't PW protected.

 

While this is done, please add these as well (should be 10 minutes as well):

+ LV Image to JPG Data.vi

+ JPG Data to LV Image.vi

 

And please move or add them to the Graphics Format palette?

Hooovahh
Proven Zealot

If anyone is interested in this feature, or supporting this function on other platforms, I made a post here that describes some of the things I did and gives example code of compression methods.