From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I built an application to store de front panel of vi in a JPEG image file, but native labels of controls and indicator are unclear after image capture, some one knows why? I have a working example you can test.

For some label colors like yellow or green, this defect is almost invisible, but for black color or any dark tone like brown or dark gray after file creation appears unclear labels.
0 Kudos
Message 1 of 4
(2,435 Views)
I wouldn't use JPEG for a front panel, unless you have photographic images on it.
If it's just buttons, knobs, graphs, etc., use PNG format - it's smaller and better (for that sort of image).

JPEG is for photo-type images.

BMP will be bigger file, but clearer than JPEG.

If you must use JPEG, use the highest quality and see if you have the problem. Back off on the quality setting until you can't stand it any more.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 4
(2,435 Views)
In more details, JPEG uses lossy compression and is not really suitable for cartoon-like pictures with objects containing high-contrast sharp features such as lines and boxes (as found in front panels). This has to do with the truncation in the 2D cosine transforms which gives you weak ripples near sharp edges, not visible in typical photographs.
Of course you could set the quality to 100% (optional input) for no truncation with a trade-off of larger files, but it's pretty pointless. JPEG is only meant to be used for photographs.

PNG is a fantastic format (intended as a GIF replacement), uses lossless compression, and wins in all aspects over jpeg for your intended use. All modern applications can deal with them (e.g. you can insert them into word or powerpo
int) and any modern browser can display them. (see e.g. the PNG home site for more info).
0 Kudos
Message 4 of 4
(2,435 Views)