ImageGlass icon indicating copy to clipboard operation
ImageGlass copied to clipboard

Connot Open Large Resulution File in PNG

Open CPuddingOwO opened this issue 6 months ago • 2 comments

Windows OS version

Windows 11 24H2

ImageGlass version

v9.3.2.520 (64-bit)

ImageGlass release

Classic

1️⃣ Steps to reproduce

Open (33763px x 16424px) PNG file; Then You Will See It

2️⃣ Actual behavior

Immediately fills up all remaining running memory. After about 10 seconds. Memory usage returns to normal (really?). Displays an error message.

3️⃣ Expected behavior

Normal display (I use Nearest rendering, I want to see every pixel clearly)

4️⃣ Screenshots / Video / Sample image file

Error Message:

Image

Step Video:

https://github.com/user-attachments/assets/4c5358d8-3738-4497-9af7-2347947c83f1

Target Image File:

Target Png too large, cannot sent at here; go to Onedrive

https://1drv.ms/i/c/cf0210bc3a28fb42/Eb_orje1azhPmzlCKrDQiZwBqztvpOV_YvnIYM3UOMgzsQ?e=iuVpGx

Target PNG image is a community-made Rain World Mod map (in progress)

5️⃣ Additional context

Translated By Google Translate

I saw a similar closed issue, but it mentioned AVFI and the error message was different. #2035

It can be opened in the old version v9.1.6.14, but the image resolution will only read 16384x7969

If a smaller image (22269 x 8728; 7.11MB) is used, it will also be reduced to 16384x6421

CPuddingOwO avatar Jun 18 '25 00:06 CPuddingOwO

@CPuddingOwO it looks like an issue with Magick.NET, can you help to report there https://github.com/dlemstra/Magick.NET/issues

d2phap avatar Jun 19 '25 12:06 d2phap

Probably not. I can't seem to get any log information other than the automatically popped-up ErrorMessage, and most of my words were translated using Google Translate, so there might be something wrong with my expression. Maybe you can report it, because I don't know how to get a more detailed log file.

I haven't learned any .NET development, so I don't know how to do it, sorry.

CPuddingOwO avatar Jun 19 '25 20:06 CPuddingOwO

@CPuddingOwO It will be fixed in the next release.

Image

d2phap avatar Aug 31 '25 08:08 d2phap

@CPuddingOwO It will be fixed in the next release.

Image

Has the issue of excessive memory usage when loading such high-resolution images been fixed?

CPuddingOwO avatar Sep 04 '25 10:09 CPuddingOwO

In next version, IG will switch to use WIC (Windows native codec) for the large images (if supported). This will reduce the memory usage and much faster than using Magick library.

Users can set the minimum image dimension to use WIC via setting MinDimensionToUseWIC in igconfig.json. The default value is 10000, meaning that if the width or height of the image is from 10000, IG will try to use WIC.

d2phap avatar Sep 04 '25 10:09 d2phap