Downscaling artifacts for EXE files with large icons

There is a downscaling problem with EXE thumbnails, especially if the icons have anti-aliasing, shadows, etc. In my tests I've focused on 256x256x32 icons, the max my Win10 supports, but can't say anything about Win11 or other icon sizes.

First things first, what I could definitely rule out:

  • This problem seems to be limited to .EXEs, does not occur for .PNG, or the .ICO files. The very same .ICOs in the .EXEs scale down perfectly fine outside, but not when embedded.

  • Windows Explorer does not have the issue; I scaled up and down with Ctrl-Scroll.

  • It is also not related to Visual Styles or Alpha Blending settings. Some settings mitigate the problem a tiny bit but not remove. Selection state or color also don't make a big difference.

  • It happens only at thumbnail sizes below 256x256; and not only at odd numbers like 57 or 213 but also 128, 64, 32.

  • I increased thumbnail mem size, cache size, cleared, etc. No help.

  • In my daily dev VM still with DOpus v12 the same problem exists, in fact worse, the EXEs are rendered with artifacts even at 256x256 or higher.

Below's a quick demo, first with DOpus then WinExplorer. H264 codec introduced some artifacts of own, but the ICOs are perfectly smooth in reality. SMDV and Run are affected most severely and instantly visible, others are mid to low level visible if you know what to look for: H2testw with shade problems, both CCleaner with white artifacts around the handles, and Autoruns with white artifacts at the top border.

I got a workaround for now and you guys are super busy, so no need to hurry on my account. Attaching 2 problematic icons for your own tests.


ICON SCALING.rar (67.5 KB)

Not sure what I'm looking for here. The video looks fine to me?

Try full-screen, most likely MP4 artifacts. Here's an enlarged screenshot of EXE vs PNG (but ICO looks identical to PNG)

Do you have pixelated upscaling selected in Preferences / File Display Modes / Thumbnails? I suspect it's just that.

Nope, that's not it. I tested out all 5 settings. PNG & ICOs always look fine, but not EXEs.

Here's a an empty AHK script I compiled with one of the icons.

TestEXE.rar (432.6 KB)

Did you try the setting? It seems to fix it here.

Screenshots with all 5 settings. Thumbnails are around 240x240.

Screenshots.rar (444.1 KB)

I tested out all 5 over and over. They're not fixing the EXEs. And what I don't understand is, wouldn't this setting affect the PNG & ICOs too, why only EXEs?

You're on the wrong Preferences page in those screenshots. That's for Details mode not Thumbnails.

EXE icons are scaled differently to PNGs, since they tend to contain different types of graphics and are often very small.

Yeah, just realized myself, my bad :slight_smile: But I re-did the screenshots. They didn't help either.

Screenshot2.rar (752.7 KB)

So if EXEs are scaled differently, why does Windows Explorer not have the problem?

EDIT: And on further thought I get even more puzzled. This setting mentions only upscaling, not downscaling, and I have 0 problems with upscaling, only downscaling.

It’s different in Explorer because Explorer does something different.

The aim is to make tiny (e.g. 16x16) icons display nicer on high DPI screens. That’s something Opus does which Explorer doesn’t do.

We might add an upper size limit so pixelated scaling isn’t used for larger (but still small) icons.

The icon you’re looking at is fairly small and is being upscaled, not downscaled. It’s probably lower resolution than you think. Set the scaling mode to never upscale to see its true size.

But that is not true. I uploaded the icons above Leo, smdv icon has 1x 256x256x32b image, no other resolution or size, the run icon has more resolutions, but its problem is the semi-transparent trail on the left becoming very ugly and blocky. Also the Autohotkey EXE package has the smdv file too. Extract it with an icon editor and see for yourself if you do not believe me, or put them into an EXE yourself. All test files are above.

By the way, I have also created ICOs multiple times with IcoFX & GreenFish with multiple mid-steps 128, 64, 32, in 16 bit, 24 bit and multiple combinations. Always the same problem. When I put icons with 64x64 max for example I have no problems. It looks like somewhere during rendering DOpus loses some of the resoluton, like from 24+8 alpha bit to 16+8 or something, noticably visible on the run icon and artifacts are introduced.

These are apps I used to create, edit, extract the icons. See for yourself.

The original image is a 2048x2048 PSD, but since Windows 10 supports max 256x256 icons, I used 256 for the icon.

Since we got competely side-tracked by upscaling. Most of my files are highres, I'll rarely need it but I gave upscaling a try, too.

No matter what upscaling settings I use, if the EXEs have lowres icons in themselves, their icons are never upscaled when thumbnail size is set to higher than they support (my default is 256x256 thumbs). EXEs always stay at 16px or 32px or whatever they have. I got a couple odd 48s and 64s lying around too. Sysinternals suite has a nice mix of apps with 16 & 256 icons. I used ProcExp portable which has a 128x128 icon. So unless there are other settings I don't know of, I doubt if there's there even an upscaling for EXEs at all. But upscaling indeed applies to PNG & ICOs; smooth upscaling looks particularly great by the way, this is muuuuch better than v12!

Of course, the artifacts also occur for .LNK files which point to .EXEs with 256x256x32 icons as well, but that is to be expected I'd say.

If I weren't 100% sure already this has nothing to do with upscaling, but downscaling, this definitely double-confirms it.

You're absolutely right, there were two separate issues here. Both have been fixed for 13.2.1:

  • For the upscaling, pixelated upscaling will only be applied when increasing an image to at least 3x its original size.

  • For the fringing, there was a bug in how the resizing code handled the alpha channel in icons, which I've tracked down and fixed.

1 Like

:heart_eyes:
You/You guys are the heroes we don't deserve! Thank you.
As said, it wasn't too much important for me, but I nearly started doubting myself :smiley:

1 Like