Enhanced Icon Editor

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.

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

0 Kudos
Message 1 of 10
(3,524 Views)
9 REPLIES
Highlighted

Re: Icon glyphs does not handle standard transparency.

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

http://www.newgistics.com
0 Kudos
Message 2 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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

0 Kudos
Message 3 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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.

http://www.newgistics.com
0 Kudos
Message 4 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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

0 Kudos
Message 5 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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.

http://www.newgistics.com
0 Kudos
Message 6 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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.

0 Kudos
Message 7 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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

0 Kudos
Message 8 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

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...

http://www.newgistics.com
0 Kudos
Message 9 of 10
(2,136 Views)

Re: Icon glyphs does not handle standard transparency.

ThSa wrote:

Just sent me an email...

Done (I sent you a private message).

PJM

0 Kudos
Message 10 of 10
(2,136 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.