It's the little things

It's the little things

28M Downloads

Crash on Windows when using an icon.png with dimensions above 128px²

kreezxil opened this issue · 8 comments

commented

I believe it exists will all of your versions.

if the icon for the pack is larger than a certain, size, i think 32x32, on Windows machine the pack that the mod is in will crash.

On Linux and Mac it does not crash.

commented

The maximum allowed icon size on Windows is 256x256. Above that will cause a crash as you've discovered. 64x64 should work fine.

commented

Turns out I was wrong. While Windows does support icons up-to 256x256, itlt's method of setting the icon on Windows permits a maximum of 128x128, still much larger than your suspected 32x32 though. :)

commented
commented

This limitation is on Windows' side, not ours.

Besides, I doubt you'll need more than 128x for a window icon - above that without a proper ico file will theoretically enforce bilinear or even nearest neighbour downscaling on most displays leading to a really blurry and ugly icon. You can see this for yourself if you set a 128x icon.png in itlt and look at the window icon on the top left.

Infact, using a 400x400 png on any platform will likely scale down poorly compared to an image with resolution of power of two (e.g. 32x, 64x, 128x) unless you're using like a 4k 13" display or something.

A possible solution in the future would be to support ico files, but I'll have to look into how to go about it as I'm not sure how hard it would be to implement while maintaining Linux and Mac compatibility.

commented
commented

Added wiki with some details regarding this, will look into supporting ico files in the future, no guarantees though.
https://github.com/zlepper/itlt/wiki

commented
commented

This has been fixed and all suggestions implemented in v2.

With v2, you can use an ICO with multiple images inside of different sizes, with no size restrictions. I've tested it with this icon that goes up to 256px and it works even on Windows. When an exact size it needs isn't available, it'll grab the closest one and resize it automatically. v2 supports ICO, ICNS and PNG on all operating systems, but currently, only ICO supports the huge sizes you're wanting.

The configs and wiki have been updated for v1 to reflect their requirements. v2's config is detailed and also has a dedicated wiki page for iconography if you really want a lot of depth: https://github.com/zlepper/itlt/wiki/Customising-your-modpack's-branding