LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

png to 2D picture "ugly" result

Solved!
Go to solution

First of all, sorry about I cannot define my problem better, but I am really not familiar with graphics handling, and picture transforming, so I can only say the result is ugly 🙂

I have a simple example png file, created from a vector graphic svg file, using Inkscape. Size of the png is 300 x 200, dpi: 270.

 

My problem is that, I would like to present this png picture on my front panel in good quality, in a 2D picture indicator. When I do this, the result looks "ugly" or "pixellized". Is there a way to display such png file in LV with a better quality (I have LV 2015 Pro 32bit, but no IMAQ and other similar toolkits available)? If I have a look at this png file using for example Irfanview, even after some zoom in, the picture looks good and "smooth".

Right now I use this simple way to load the png into the 2D Picture indicator:

 

UserInterfaceEventPattern 3_BD.png

I have also attached the png file for reference.

 

Edit:

when I compare the LV and Irfanview results (left is LV):

 

comparison.png

 

0 Kudos
Message 1 of 7
(4,308 Views)

As a workaround I just decided to use a picture ring, since for this project I have a predefinied static list of png pictures. Looks very sharp and nice 🙂

Anyway, I am also still interested how to display a png in a 2D picture indicator with good resolution...

0 Kudos
Message 2 of 7
(4,270 Views)
Solution
Accepted by topic author Blokk

I take your png and fill white background.
There is result (bottom img):

2png.png

Message 3 of 7
(4,253 Views)

Please attach the VI, or snippet.

"fill white background" How? Programmatically?

0 Kudos
Message 4 of 7
(4,244 Views)

Ok, i got it!

It looks like LabVIEW cannot handle png files with transparent background good. I have changed the transparent background to white using an image editor, and I get good result after importing to 2D Picture indicator.

Thanks, lesson learned 🙂

0 Kudos
Message 5 of 7
(4,228 Views)

Blokk a écrit :

 

It looks like LabVIEW cannot handle png files with transparent background good. I have changed the transparent background to white using an image editor, and I get good result after importing to 2D Picture indicator.

Thanks, lesson learned 🙂


There is an interesting thread on this subject,

 

Ben64

0 Kudos
Message 6 of 7
(4,194 Views)
Thanks Ben, indeed interesting! I keep this in my mind if I need to deal with transparent images again.
0 Kudos
Message 7 of 7
(4,182 Views)