[GH-ISSUE #245] [Feature request] apng compress #1570

Closed
opened 2026-03-01 18:46:33 +03:00 by kerem · 4 comments
Owner

Originally created by @Kristinita on GitHub (Jan 18, 2018).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/245

1. Request

It would be nice, if would be possible compress apng files in ScreenToGIF.

Implementing any compression open source tools are welcome. apngopt for example.

2. Argumentation

  1. Browser, where users to see apng images will hang less.
  2. Disk storage economy.

3. Steps to reproduce

User record and edit image → user save file as apng.

4. Expected behavior

If "compress_apng": true in options:

    apng compress after creating.

Thanks.

Originally created by @Kristinita on GitHub (Jan 18, 2018). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/245 ### 1. Request It would be nice, if would be possible compress apng files in ScreenToGIF. Implementing any compression open source tools are welcome. [**apngopt**](https://sourceforge.net/projects/apng/files/APNG_Optimizer) for example. ### 2. Argumentation 1. Browser, where users to see `apng` images will hang less. 1. Disk storage economy. ### 3. Steps to reproduce User record and edit image → user save file as `apng`. ### 4. Expected behavior **If** `"compress_apng": true` in options:     apng compress after creating. Thanks.
kerem closed this issue 2026-03-01 18:46:34 +03:00
Author
Owner

@vatterspun commented on GitHub (Jan 20, 2018):

My understanding on this is that you can throw a lot of optimization schemes at a given individual PNG file. This is great for websites that have millions of visitors per month because even 10k space savings is an astonishing amount of bandwidth. You don't need that for casual users.

The same is true for APNG files. Obviously as time goes by, better processors and tools will enable higher and higher compression, but I'd caution against the really intensive compression methods by default as they will slow simple file saving for casual users. Enabling the really deluxe tools like apngopt, truepng, pngout, leanify, pngwolf, etc. should probably be optional (note that I'm not sure all of those support animated PNG).

Ultimately, I like smaller files and I like that animated PNGs are often much smaller than their GIF counterparts, but it's a balance.


Related: https://github.com/NickeManarin/ScreenToGif/issues/129

<!-- gh-comment-id:359208296 --> @vatterspun commented on GitHub (Jan 20, 2018): My understanding on this is that you can throw a lot of optimization schemes at a given individual PNG file. This is great for websites that have millions of visitors per month because even 10k space savings is an astonishing amount of bandwidth. You don't need that for casual users. The same is true for APNG files. Obviously as time goes by, better processors and tools will enable higher and higher compression, but I'd caution against the really intensive compression methods by default as they will slow simple file saving for casual users. Enabling the really deluxe tools like apngopt, truepng, pngout, leanify, pngwolf, etc. should probably be optional (note that I'm not sure all of those support animated PNG). Ultimately, I like smaller files and I like that animated PNGs are often much smaller than their GIF counterparts, but it's a balance. --- Related: https://github.com/NickeManarin/ScreenToGif/issues/129
Author
Owner

@NickeManarin commented on GitHub (Jan 21, 2018):

With the latest release, a feature called "Execute post encoding commands." is available. It's a text area where you can type commands that will be executed after the encoding.

As a solution to this request, you can write a command passing the encoded file to apngopt:

apngopt [options] {p} {f}\anim_opt.png

{p} = the full path to the encoded file.
{f} = the full path to the folder where the encoded file is located.

<!-- gh-comment-id:359248992 --> @NickeManarin commented on GitHub (Jan 21, 2018): With the latest release, a feature called "Execute post encoding commands." is available. It's a text area where you can type commands that will be executed after the encoding. As a solution to this request, you can write a command passing the encoded file to apngopt: > apngopt [options] {p} {f}\anim_opt.png > {p} = the full path to the encoded file. > {f} = the full path to the folder where the encoded file is located.
Author
Owner

@vatterspun commented on GitHub (Jan 17, 2019):

It would be nice, if would be possible compress apng files

If you want to run your PNG file through a gamut of different compression tools, try FileOptimizer (also free and open source https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer). Be warned that even on the low setting, it runs slowly when compressing PNG files. That may have changed with the last release, I'm not sure.

<!-- gh-comment-id:455028711 --> @vatterspun commented on GitHub (Jan 17, 2019): > It would be nice, if would be possible compress apng files If you want to run your PNG file through a gamut of different compression tools, try FileOptimizer (also free and open source https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer). Be warned that even on the low setting, it runs *slowly* when compressing PNG files. That may have changed with the last release, I'm not sure.
Author
Owner

@Kristinita commented on GitHub (May 22, 2020):

Status: CONFIRMED ✔️

1. Testing environment

  1. Windows 10.0.18363 Pro N for Workstations 64-bit EN
  2. ScreenToGIF 2.24.0

2. Testing

I added PngOptimizerCL post encoding command, when I save this .apng file:

pngoptimizercl {p} -BackupOldPngFiles

.apng file successfully compressed for me.

3. Note

.apng lossy compression still a big problem, but this doesn't apply to ScreenToGIF.

Thanks.

<!-- gh-comment-id:632813128 --> @Kristinita commented on GitHub (May 22, 2020): **Status: CONFIRMED** :heavy_check_mark: ### 1. Testing environment 1. Windows 10.0.18363 Pro N for Workstations 64-bit EN 1. ScreenToGIF 2.24.0 ### 2. Testing I added [**PngOptimizerCL**](https://psydk.org/pngoptimizer) post encoding command, when I save [**this**](https://github.com/NickeManarin/ScreenToGif/issues/239#issuecomment-632801273) `.apng` file: ```text pngoptimizercl {p} -BackupOldPngFiles ``` `.apng` file successfully compressed for me. ### 3. Note `.apng` lossy compression [**still a big problem**](https://github.com/hadrien-psydk/pngoptimizer/issues/14), but this doesn't apply to ScreenToGIF. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1570
No description provided.