Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 10 posts ]
Author Message
 Post subject: Blurry tray in Winstep Xtreme
PostPosted: Fri Jul 15, 2011 11:23 pm 
Offline

Joined: Fri Jul 15, 2011 9:45 pm
Posts: 3
Downloaded the Winstep Xtreme 11.6 trial, but I found an odd little issue.

How to replicate:
1. Use a low tray icon size (say 16px) in any of the products
2. Set one icon in the system tray to use an image the same size (in this case 16x16px)
3. Observe as it shows up all blurry

It doesn't affect the tray icons which aren't customized. The image format doesn't seem to matter (tried quite a few).
The cause seems to be that the custom icon is rendered at a size less than a pixel smaller than it should be.


Back to top
 Profile  
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 1:45 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11936
This only happens on the dock, right? What mouse over effect are you using?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 4:32 am 
Offline

Joined: Fri Jul 15, 2011 9:45 pm
Posts: 3
Happens in both NextSTART and the dock.
No mouse over effect for the dock.

All other icons at that size look sharp. It's just the custom tray icons...


Back to top
 Profile  
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 4:46 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11936
Did you use a 16x16 ICO or a PNG file to customize the tray icons?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 11:30 am 
Offline

Joined: Fri Jul 15, 2011 9:45 pm
Posts: 3
I've tried both 16x16 ICO and PNG files.
I even tested loading the original icon for a tray item, but as a custom icon.

It always has the blur.

If I use a sharp 16x16 white square as the icon and put it on a black background, it looks like this:
Image
Makes me think it resizes the icon so that it becomes slightly (less than a pixel) smaller than the original.


Back to top
 Profile  
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 12:17 pm 
Offline
User avatar

Joined: Sat Jan 08, 2011 5:57 pm
Posts: 898
Location: Athens, Greece
Sorry to barge in, but... could it be the resize prefiltering in action again?
Just an idea...

_________________
Live long and prosper...


Back to top
 Profile WWWYIMICQ 
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 12:36 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11936
Kind of... I just revisited the code and the problem here is that customized tray icons are always rendered as 128x128 images and then cached in memory. The latter is to save time and processor usage, and the former because, for the most part, it only makes sense to customize tray icons when using larger icon sizes (i.e.; the dock usually magnifies to 128x128).

Due to the way GDI+ resampling works, rendering an original 16x16 image to 128x128 results in those anti-aliased lines.

Solving this is not so simple: I either stop caching the customized icons in memory, or I have to come up with multiple cached versions, one for each tray icon size in use.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 12:52 pm 
Offline
User avatar

Joined: Sat May 07, 2011 11:16 pm
Posts: 202
what do you mean by "multiple cached versions, one for each tray icon size in use"? if i magnify to 128px there will be icons with all sizes starting from 16x, (so 17x, 18x, 19x...127x)? That's not good or at least it doesn't seem to be a good idea because of the memory usage (on both RAM and Hard Drive).
Why not just caching 2 images? the first is for the stand-by icon which is cached at the minimum size (this being 16x) and the second one cached at the maximum magnified size; this allows to set a low resolution icon and still maintains compatibility with high resolution icons which will be resized to 16x for the low resolution icon.

_________________
We are Anonymous. United as one. Divided by zero. We do not forgive. We do not forget. Expect us.
http://www.youtube.com/watch?v=WE-WkBqf7j


Back to top
 Profile  
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sat Jul 16, 2011 5:24 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11936
You're thinking in terms of per-dock icon cache, but the cache of customized tray icons is global and the same cache serves all objects that display a tray: if the tray base icon size (before magnification) on one dock is 48x48, on another it might be 16x16.

On the other hand, having a small icon (16x16) and a big icon (128x128) cache is wasteful but might indeed work without requiring too much modification to the code. :P

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Blurry tray in Winstep Xtreme
PostPosted: Sun Jul 17, 2011 3:50 am 
Offline
User avatar

Joined: Sat May 07, 2011 11:16 pm
Posts: 202
You're right Jorge, but keep in mind that caching (for example) 5 items with each having all sizes from 16x to 128x would take a lot of time and memory (and I haven't even considered the possibility of 160x -magnified- like I have set now, or higher); you would have to build (128-16)*5=560 images for just 5 items. But I assure you that people usually have much more than 5 items in tray (right now I have 9 icons). Maybe at this point speed wouldn't care much, it'll just slow down Nexus's startup, which would still work greatly after building it. But as programs open and close from tray there would be a high memory and CPU usage for building the images and caching them.

Anyway, listen this other idea: why not just getting the image size before caching it, and using it's real size as cached image size? That would be the best because you'll actually fit the original icon size. I think this one is a pretty good idea, huh? ;)

p.s. I'm out of ideas, that's the last one :D
p.p.s. Sorry Stephen for having (kind of) cut you out of this discussion :)

_________________
We are Anonymous. United as one. Divided by zero. We do not forgive. We do not forget. Expect us.
http://www.youtube.com/watch?v=WE-WkBqf7j


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 10 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: No registered users and 270 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: