Menu

8-bit apng

Main Forum
Shazy
2018-03-10
2023-02-22
  • Shazy

    Shazy - 2018-03-10

    Hey maxst!

    You have written a wonderful piece of software and I really find it useful.

    I recently used the apngdis to access individual images of an apng file, used pngquant to reduce them from 24 bits to 8 bits and used apngasm to reassemble them back into apng but I was surprised to find out that apngasm converted them back to 24 bits!

    So my request are these:

    1. Could you please make it so apngasm makes 8 bit apngs?

    2. Is it possible to include "pngquant" - http://www.pngquant.org in apngasm?

    3. Could you please add the compression option "pngwolf-zopfli" - https://github.com/jibsen/pngwolf-zopfli, as it has better compression compared with "zopfli"?

    Thanks for the wonderful software!

     
  • Max Stepin

    Max Stepin - 2018-03-12

    pngquant would create individual 256-color palette for each frame, so together all frames will contain more than 256 colors, that's why apngasm switches to 24 bit.
    apngasm is strictly lossless.

    But it's possible to create 8-bit apng files with my tools. Two ways:

    1. Use apng2gif and then gif2apng. Wu64 quantizer which is used in apng2gif is a bit different from pngquant, but it's still pretty good.

    2. Use apngdis with -s option, for example:
      apngdis APNG.png -s
      It will create a vertical strip of all frames, in one file.
      Use pngquant to optimize that file.
      Use apngasm with -vs (vertical strip input) option to create APNG, for example:
      apngasm APNG-8bit.png APNG_strip.png -vs15

    Good luck!

     
    • GGG GGG

      GGG GGG - 2023-02-22

      Use apngdis with -s option, for example:
      apngdis APNG.png -s

      @maxst Does the strip function still exist? It doesn't seem to work for me, and there is no apngdis -h for more options. Running with -s just outputs individual pictures like normal for me.

       

Log in to post a comment.