d2phap / ImageGlass

🏞 A lightweight, versatile image viewer
https://imageglass.org
Other
7.75k stars 499 forks source link

Very slow APNG decoding #1731

Open nistvan86 opened 11 months ago

nistvan86 commented 11 months ago

System information:

To Reproduce

Steps to reproduce the behavior:

  1. Download the optimized png file from this post: https://github.com/wulkano/Kap/issues/910#issuecomment-671669704
  2. Rename it to apng
  3. Try opening it in ImageGlass

Actual behavior:

It takes a couple seconds for the first frame to become visible and the animation starts playing, and until that the CPU usage spikes. If you download the original 10MB non optimized png file, the loading time becomes even more noticeable.

Expected behavior:

Animation should start immediately, just like with animated WEBP. Try dropping the same files into a Chrome/Firefox tab, it will play them instantly. I should be able to smoothly scroll through a directory full of APNG files to quickly find an animation.

d2phap commented 11 months ago

APNG is not officially supported in IG. It's noticeable slow because of the background image frame conversion