Toolbar Zoom: Internal vs External Images

Things you’d like to miss in the future...
Post Reply
jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Toolbar Zoom: Internal vs External Images

Post by jupe »

This is a longstanding issue but I since you are working on the toolbar currently I thought I would bring it up now. I run my toolbar with a minor zoom to get the exact size I want and although the images appear low quality I'd just accepted that, but now that you've enabled external images, I can clearly see that those images zoom really well and don't lose quality, so either the zooming code is different for each, or somehow when the toolbar is set to zoom it upscales the LQ image instead of using the HQ image and down-scaling.

To run a test you can just set a toolbar image using a new external image and zoom the toolbar and see that the external image stays a much higher quality than the internal images when zoomed. Here is a comparison shot I was preparing earlier to suggest a reorientation of the new RFO button, internal icon on the left, external on the right (but there are much worse examples):


Clipboard-21_03_2019.png
Clipboard-21_03_2019.png (1.42 KiB) Viewed 1246 times

And below is a very exaggerated example, you can see the RFO button (external image extracted from exe without resizing, so should be same resolution as the internal icons) maintains sharpish edges, while the other internal icons edges are really pixelated.
Clipboard-22_03_2019.png
Clipboard-22_03_2019.png (10.8 KiB) Viewed 1246 times

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Toolbar Zoom: Internal vs External Images

Post by admin »

What zoom factor are you using for those green arrows?

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Toolbar Zoom: Internal vs External Images

Post by jupe »

1.1

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Toolbar Zoom: Internal vs External Images

Post by admin »

Strangely I cannot reproduce the difference. At toolbar zoom 1.1 the left image is original from the toolbar, the right image is loaded via PatchImagesPath from the 24x24 source image. They both look identical:
2019-03-22_163656.png
2019-03-22_163656.png (630 Bytes) Viewed 1190 times

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Toolbar Zoom: Internal vs External Images

Post by admin »

Well, nevertheless when looking into this I saw some room for improvement, and, man, it did improve! :beer: Say bye-bye to low quality zooming!
2019-03-22_175404.png
2019-03-22_175404.png (820 Bytes) Viewed 1185 times
QED

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Toolbar Zoom: Internal vs External Images

Post by jupe »

admin wrote: 22 Mar 2019 16:39 Strangely I cannot reproduce the difference. At toolbar zoom 1.1 the left image is original from the toolbar, the right image is loaded via PatchImagesPath from the 24x24 source image. They both look identical:
2019-03-22_163656.png
Ah, yes sorry, that was a bad example on my part, it was a mock up I had created for a different purpose, before you implemented PatchPath, so I used it only because I had it lying around, I should have double checked its relevance first.

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Toolbar Zoom: Internal vs External Images

Post by jupe »

admin wrote: 22 Mar 2019 17:52 Well, nevertheless when looking into this I saw some room for improvement, and, man, it did improve! :beer: Say bye-bye to low quality zooming!

2019-03-22_175404.png
QED
Wow, thanks for looking into this issue even though my original report image was slightly misleading, because the end result is you have made a massive improvement! :appl: , I guess people using touch screen mode (or HiDPI) will benefit the most (besides me and my bizarro zoom :P ).

Additional to the drawback you've already noted, I've noticed a slight problem, more visible on larger zoom levels, it seems the image map is 1px off so parts of some images are appearing in others. Here is a small example showing a few of the errors:
2019-03-23_104717.png
2019-03-23_104717.png (12.52 KiB) Viewed 1167 times

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Toolbar Zoom: Internal vs External Images

Post by admin »

Yes, I saw that too. Investigation ongoing... :maf:

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Toolbar Zoom: Internal vs External Images

Post by admin »

This is an artifact of the bicubic interpolation. I was able to soften the effect. But to totally eliminate it I have to reconstruct the image resource so that there is more free space between the images. When I find the time...

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Toolbar Zoom: Internal vs External Images

Post by jupe »

That's a shame, it sounds like I might have opened pandoras box, nice job softening the effect, personally I don't mind the artifacts (which are pretty much invisible in dark mode anyway) but I hope other users don't end up posting bug reports about them in the future, if you have to end up undoing this change, no worries on my part.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Toolbar Zoom: Internal vs External Images

Post by admin »

Done. 8)

Post Reply