Since v7.9 when I started using Ignition I have had issues with the app icons for Vision apps. Some of this info is present in other threads, I just wanted to put it all together and see if someone has a more elegant solution or there is a solution directly from IA to make this work better by default.
Problem 1: Pixelated or Fuzzy Icons on Desktop
seen pixelation issues with the desktop icons and the same issue has carried over to v8.1, as you can see below where Ignition’s own logo looks pristine but the PNG I uploaded to image management and reference in the Launch Icon in the project settings looks pixelated unless the icons on the desktop are a specific size.
Starting with a 512x512 PNG image…pixelated below 48
~48x48 (perfect) ~36x36 (pixelated)
Starting with 48x48 image…fuzzy sometimes
~48x48 (fuzzy) ~36x36 (perfect)
I believe this has something to do with how Ignition is trying to convert the PNG you provide to an ICO automatically, where something in that conversion may be causing some loss in fidelity.
Problem 2: At least in v8.1, the icon does not show in the taskbar on Windows
This is fine when you only have one Ignition app, but I have some stations where they have to switch between 3 or 4 all day and have to go trial and error through all the icons on the taskbar.
Solution: Not saying this is the only solution, but it is what seems to work the best out of the things I have tried. Open to better solutions from others.
-
Pre-requisites:
-
Open an Ignition Designer
-
Open Image Management
-
Go to Ignition
AppLogos/
folder in Image Management and create a new folder with the name of the Ignition app and use this new folder for uploading your app logo images, such asAppLogos/<AppName>/
-
Go to flaticon.com or a similar icon website and find an icon and download as
PNG
. Must be at least 256x256 to avoid pixelation issues. -
Rename
PNG
to<AppName>_original.png
and upload to Ignition images folder -
Run ImageMagick from cmdline to create ICO:
magick <AppName>_original.png -define icon:auto-resize="16,24,32,48,64,72,96,128,256" <AppName>.ico
-
Rename
<AppName>.ico
to<AppName>.png
on your file system, or else Ignition image management will not allow it to be uploaded -
Upload
<AppName>.png
to Ignition images. Once uploaded, rename from<AppName>.png
to<AppName>.ico
inside Ignition image management -
Run ImageMagick to create icon for Taskbar:
magick <AppName>_original.png -resize 48x48 <AppName>_48.png
-
Upload
<AppName>_48.png
to Ignition images folder -
Copy the path to the ICO image
-
Go to
Project > Project Properties > Launching
and paste it into theLaunch Icon
path and save -
Add the following script to client startup to set the taskbar/titlebar icon
-
from com.inductiveautomation.ignition.client.images import ImageLoader def _set_icon(): try: win = system.gui.getOpenedWindows()[0] parent = win while parent is not None: win = parent parent = win.getParent() icon_path = "AppLogos/%s/%s_48.png" % ( system.util.getProjectName(), system.util.getProjectName(), ) win.setIconImage(ImageLoader.getInstance().loadImage(icon_path)) win.setVisible(False) # to trigger taskbar icon refresh by OS win.setVisible(True) print("Setted icon path: %s" % icon_path) except: print("Failed to set app icon") system.util.invokeLater(_set_icon, 1000)
-
-
Save the project and launch your vision app to confirm everything looks right
- You should be all set. The app logo will now appear in the following places:
-
Desktop shortcuts made using Ignition Vision Client Launcher
-
Taskbar app icon
-
Titlebar app icon
-
- You should be all set. The app logo will now appear in the following places:
Desktop shortcuts
~48x48 ~36x36
Taskbar app icon
Titlebar app icon (admittedly this is not the best, but the source image probably is not great because of the very thin black border)