LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NotifyIcon quality resolution

Hopefully I can save someone else a little head scratching.

 

I'm using the NotifyIcon code from Brinoceros (https://decibel.ni.com/content/docs/DOC-10683) (two thumbs up BTW)

 

I couldn't figure out why my notification area icons were getting deformed.  Answer was to set the size in the NotifyIcon - Set Icon.vi such as this:

 

NotifyIcon - Set Icon.png

 

Even though the file I'm using has 48x48, 32x32, & 16x16 icons in it, it looks like Cloister is absolutely correct in his post (http://www.hhhh.org/cloister/csharp/icons/) every other row/column of the 32x32 gets thrown away and what's left becomes your icon.

 

I finally got clued in about the size parameters from this: (http://msdn.microsoft.com/en-us/library/windows/desktop/ee330740(v=vs.85).aspx)

"Notification area icons should be high-DPI aware. An application should provide both a 16x16 pixel icon and a 32x32 icon in its resource file, and then use LoadIconMetric to ensure that the correct icon is loaded and scaled appropriately."

 

0 Kudos
Message 1 of 3
(2,479 Views)

I've also found that you get better results of you use really big ICOs and let the software scale it down to 16x16. For example, I used IrfanView to create an ICO that is actually 176x176 pixels. When scaled down it looks really nice.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(2,459 Views)

My previous advice, while providing a great looking result in WinXP was producing poor quality in Win7.   Also what I posted above looked terrible in WinXP running alternate DPI's.  So after a day of messing with the size parameters and icon files, I am now using the following solution

-Do NOT specify the icon size

-Create icon files with a bunch of resolutions

 

While the WinXP base icon doesn't look as good as it once did, at least WinXP alternate DPI and Win7 in both std and alternate DPI, look relatively undistorted.  My icon file now has 9 sizes 256,48,32,26,24,22,20,18,16.  The easiest way for me to create all nine layers was to use Gimp and this advice:

 

  1. Open your image in Gimp
  2. Make your canvas square
  3. Resize your layer to the image
  4. Scale the layer to the largest size in your .ico file like 64 pixels
  5. Duplicate the layer
  6. Scale the duplicate layer to the next size
  7. Keep duplicating / scaling for all the sizes you want in your .ico file
  8. Save [Export] as .ico

 

from: http://regx.dgswa.com/html/Gimp+ico+how+to

 

sorry for raising a dead thread, but I don't like running into mis-information, so I had to fix it!

0 Kudos
Message 3 of 3
(2,376 Views)