From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Enhanced Icon Editor

cancel
Showing results for 
Search instead for 
Did you mean: 

Icon glyphs does not handle standard transparency.

The new Icon Editor does not handled the standard PNG transparency (see screenshot). On the image below, all the "black area" should be transparent.

IE transparent pb.png

Above is what I see in the LabVIEW Icon Editor.

IE transparent pb 1.png

This is what I should see (this is from windows explorer)

Additionnally, I just noticed that the white color is consider to be transparent (this is somewhat unexpected). I understand that white outside icon area are considered to be transparent (for the resulting icon), but when I take a screenshot and all my white pixel are transparent this is odd.

Note: I will see if I can fix this transparency issue.

PJM



  


vipm.io | jki.net

0 Kudos
Message 1 of 10
(8,133 Views)

The problem is the treshold of Read PNG.vi which is set to 0.

0 Kudos
Message 2 of 10
(6,745 Views)

ThSa wrote:

The problem is the treshold of Read PNG.vi which is set to 0 instead of 127.

This was my initial though, but while changing the threshold read the image properly, afterwards the "flood glyph.vi" paint the outside black. I am looking at the code as we speak trying to understand exactly why this is so (I don't believe that this was the intent).

This might be the pb:

IE transparent pb 2.png

PJM



  


vipm.io | jki.net

0 Kudos
Message 3 of 10
(6,745 Views)

Actually it was.

Based on the fact that white is transparent, we run into problems where glyphs that have a white body (for example a rectangle with black border and white inside) was without the flooding just a black border. With the flood VI, we change temporarely the color to make sure, that the white content of a glyph/template is not changed.

0 Kudos
Message 4 of 10
(6,745 Views)

Thomas,

ThSa wrote:

Actually it was.

Based on the fact that white is transparent, we run into problems where glyphs that have a white body (for example a rectangle with black border and white inside) was without the flooding just a black border. With the flood VI, we change temporarely the color to make sure, that the white content of a glyph/template is not changed.

I think I understand.

What I am trying to say is that I don't think that the intent was to replace the transparent surrounding area by black.

PJM



  


vipm.io | jki.net

0 Kudos
Message 5 of 10
(6,745 Views)

U are right, this is the problem.

Just set the combine Masks flag to true and it should work.

The input data is 32bit (in case that the glyph has an alpha channel) and a glyph with an alpha channel has already a mask.

0 Kudos
Message 6 of 10
(6,745 Views)

Ok, I found where the problem lies.

The input image data is 32 bit. The "Create mask.vi" call "Unflatten Pixmap.vi" which strip the alpha transparency. The stripping result is that all transparent area are converted to black pixels, therefore your code that does the smart flood fill can not do anything. This is more a limitation of the native picture manipulations VIs that a problem in your code. I guess the best workaround is to replace alpha transparent pixel by white pixels.



  


vipm.io | jki.net

0 Kudos
Message 7 of 10
(6,745 Views)

ThSa wrote:

U are right, this is the problem.

Just set the combine Masks flag to true and it should work.

Ah, good point, I overlooked that.

I think I will release a new package with that fix.

PJM



  


vipm.io | jki.net

0 Kudos
Message 8 of 10
(6,745 Views)

I am about to release a smaller update with some bug fixes.

You might want to add this one to your package as well. It shouldn't affect the changes you made, but all in all it would be a bit nicer to have everything together.

Just sent me an email...

0 Kudos
Message 9 of 10
(6,745 Views)

ThSa wrote:

Just sent me an email...

Done (I sent you a private message).

PJM



  


vipm.io | jki.net

0 Kudos
Message 10 of 10
(6,745 Views)