LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Icon Glyph Bug

Open the icon editor.

Find the glyph "Installer_48.png".  It's bigger than 32x32 and the icon editor becomes confused when you place it.

Message 1 of 13
(563 Views)

From the name i'd assume it's 48x48 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 13
(544 Views)

That's technically not a bug, but a feature of the Windows .ico file structure.  The LabVIEW icon editor has a "design size" of (at maximum) 32 x 32 "ico-pixels" (my made-up name for Icon Pixels).  However, Microsoft allows icons of variable sizes, including 48x48 (which is what the Icon for "Installer_48" seems to be using).

 

Look in the folder LabVIEW Data\Glyphs\Actions, and set "View" to Large Icons.  Notice that icons in this folder come in various sizes.  Look at fail.png (small white-on-red button) and fail2_48.png (which is an imposingly large X on white "Now See This!" icon.

 

The fault, here, is that the Icon Editor shipping with LabVIEW has a 32-by-32 pixel palette, so cannot create an icon with 48x48 pixels.  There are, however, other icon editors that can handle this format.  To see for yourself, drag a copy of Installer_48.png to the Desktop.  Open it with Paint, and look at its size -- 48 x 48.

 

I know that there are members of the LabVIEW Community working on "improving" the Icon Editor that currently ships with LabVIEW.  Maybe they'll allow larger sizes of icons to allow us to create more beautiful Block Diagrams.

 

Bob Schor

0 Kudos
Message 3 of 13
(501 Views)

@Bob_Schor wrote:

I know that there are members of the LabVIEW Community working on "improving" the Icon Editor that currently ships with LabVIEW.  Maybe they'll allow larger sizes of icons to allow us to create more beautiful Block Diagrams.


The 32x32 icon size is dictated by more LabVIEW inners than the Icon Editor can override. Making it larger would affect the connector pane options (first thing that popped into my head).



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 13
(443 Views)

@paul_a_cardinale wrote:

Open the icon editor.

Find the glyph "Installer_48.png".  It's bigger than 32x32 and the icon editor becomes confused when you place it.


What it appears to me is happening is the glyph is being cropped to 32x32 and then placed wherever you put it. The bug I am seeing is that the cropping happens after it is placed, not during the placement.

 

There are a few ways we could rectify this. Ideas I thought of while typing this up:

1. Not doing the cropping of a glyph at all. I would need to dig into if the layers can handle this. It is also possible there are limitations in how NI saves the icon data (password protected VIs, so I would need help from NI to verify).

2. Crop the glyph to what is visible in the preview when you drop it.

3. Crop the glyph before the placement. This would likely be the simplest fix.

 

What I am requesting of you right now is to create a discussion on the LabVIEW Icon Editor GitHub repository. Include images if you can. Then it will have traceability and we can get to it at some point.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 13
(428 Views)

Now that I spent 2 hours digging into the code instead of getting actual work done...

 

The layer is saving the full glyph. The problem comes in when the icon is actually drawn as the layers are limited to the 32x32. As of right now, there is a 0-32 limit on the left, right, top, and bottom part of the image that can be cropped to. When I get more time, I would like to reexamine this exact VI to see about simplifying it and properly handle the visible range instead of the layer image size. It has also entered my crosshairs due to another refactor effort we just started on.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 13
(361 Views)

@Bob_Schor wrote:

That's technically not a bug, but a feature of the Windows .ico file structure.


Of course it's a bug.  When the icon editor encounters an icon that it can't handle, it should do something reasonable such as excluding it from its glyph list, or throwing a warning or error.  It shouldn't barf on your icon.

Message 7 of 13
(359 Views)

@paul_a_cardinale wrote:

@Bob_Schor wrote:

That's technically not a bug, but a feature of the Windows .ico file structure.


Of course it's a bug.  When the icon editor encounters an icon that it can't handle, it should do something reasonable such as excluding it from its glyph list, or throwing a warning or error.  It shouldn't barf on your icon.


I wouldn't call it "barf" on the icon. That would be if LabVIEW would crash or something like that. It simply crops the image, which is something you don't like, but definitely not barfing. It's a reasonable, although quite simplistic approach to the problem, given the deeply ingrained 32*32 pixel limits of LabVIEW icons.

 

Alternatives would require additional user interaction that prompt the user to choose between rescaling or selecting a portion of the image. Not impossible but an entire dialog of its own and as such quite a project to implement.

 

A quite simple workaround for now is to simply drag the image from your desktop to the icon area in your VI. This does an actual rescaling to the 32*32 pixel size. And that is in LabVIEW since eons (not sure if it was in 5.0 already but definitely in 7.0).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 13
(321 Views)

@paul_a_cardinale wrote:
Of course it's a bug.  When the icon editor encounters an icon that it can't handle, it should do something reasonable such as excluding it from its glyph list, or throwing a warning or error.  It shouldn't barf on your icon.

I will reiterate that any undesired behavior on the Icon Editor needs documented with a discussion on the Icon Editor repo (https://github.com/ni/labview-icon-editor/discussions). We can escalate to an issue when we have identified the problem and things are in a position that it can be worked (we don't want multiple efforts to overwrite each other). But if we don't have the discussion, it will get lost.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 13
(295 Views)

>That's technically not a bug, but a feature of the Windows .ico file structure.  The LabVIEW icon editor has a

>"design size" of (at maximum) 32 x 32 "ico-pixels" (my made-up name for Icon Pixels).

LabVIEW icon and Windows .ico are not the same thing, right?

LabVIEW release in 1986 on Mac.  Windows doesn't even exist at that time.

 

George Zou
0 Kudos
Message 10 of 13
(260 Views)