08-10-2009 12:24 PM
The new Icon Editor does not handled the standard PNG transparency (see screenshot). On the image below, all the "black area" should be transparent.
Above is what I see in the LabVIEW Icon Editor.
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
08-10-2009 12:39 PM
The problem is the treshold of Read PNG.vi which is set to 0.
08-10-2009 12:46 PM
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:
PJM
08-10-2009 12:48 PM
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.
08-10-2009 12:56 PM
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
08-10-2009 01:13 PM
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.
08-10-2009 01:14 PM
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.
08-10-2009 01:18 PM
08-10-2009 01:21 PM
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...
08-10-2009 01:31 PM