ZOPFLIPNG(1)

πŸ“¦ version 1.0.3, in opensuse-leap 16.0

✨ NAME ✨

zopflipng β€” manual page for zopflipng 1.0.3.

okay bestie, welcome to the ZOPFLIPNG(1) manual from the User Commands section πŸ’… this is the whole vibe for zopflipng, and yes, we're gonna get through every single detail together.


🌸 SYNOPSIS 🌸

zopflipng [options]... infile.png outfile.png

πŸ¦‹ DESCRIPTION πŸ¦‹

ZopfliPNG, a Portable Network Graphics (PNG) image optimizer. slay.

Also, there’s this form:

zopflipng [options]... --prefix=[fileprefix] [files.png]...

If the output file exists, it is considered a result from a previous run and not overwritten if its filesize is smaller. no cap, it’s protecting your smaller files πŸ’–


πŸŽ€ OPTIONS πŸŽ€

  • -m β€” compress more: use more iterations (depending on file size) πŸ”₯
  • --prefix=[fileprefix] β€” Adds a prefix to output filenames. May also contain a directory path. When using a prefix, multiple input files can be given and the output filenames are generated with the prefix.

If --prefix is specified without value, 'zopfli_' is used. If input file names contain the prefix, they are not processed but considered as output from previous runs. This is handy when using *.png wildcard expansion with multiple runs.

  • -y β€” do not ask about overwriting files. lowkey convenient, highkey powerful πŸ’€
  • --lossy_transparent β€” remove colors behind alpha channel 0. No visual difference, removes hidden information.
  • --lossy_8bit β€” convert 16-bit per channel image to 8-bit per channel.
  • -d β€” dry run: don't save any files, just see the console output (e.g. for benchmarking).
  • --always_zopflify β€” always output the image encoded by Zopfli, even if it's bigger than the original, for benchmarking the algorithm. Not good for real optimization. bestie, this is a benchmarking girlie, not a real-optimization girlie πŸ™ˆ
  • -q β€” use quick, but not very good, compression (e.g. for only trying the PNG filter and color types).
  • --iterations=[number] β€” number of iterations, more iterations makes it slower but provides slightly better compression. Default: 15 for small files, 5 for large files.
  • --splitting=[0-3] β€” ignored, left for backwards compatibility.
  • --filters=[types] β€” filter strategies to try:
    • 0-4: give all scanlines PNG filter type 0-4
    • m: minimum sum
    • e: entropy
    • p: predefined (keep from input, this likely overlaps another strategy)
    • b: brute force (experimental)

By default, if this argument is not given, one that is most likely the best for this image is chosen by trying faster compression with each type. If this argument is used, all given filter types are tried with slow compression and the best result retained. A good set of filters to try is --filters=0me. periodt ✨

  • --keepchunks=nAME,nAME,... β€” keep metadata chunks with these names that would normally be removed, e.g. tEXt,zTXt,iTXt,gAMA, ...

Due to adding extra data, this increases the result size. Keeping bKGD or sBIT chunks may cause additional worse compression due to forcing a certain color type, it is advised to not keep these for web images because web browsers do not use these chunks. By default ZopfliPNG only keeps (and losslessly modifies) the following chunks because they are essential: IHDR, PLTE, tRNS, IDAT and IEND.

🌈 Usage examples 🌈

  • Optimize a file and overwrite if smaller: zopflipng infile.png outfile.png
  • Compress more: zopflipng -m infile.png outfile.png
  • Optimize multiple files: zopflipng --prefix a.png b.png c.png
  • Compress really good and trying all filter strategies: zopflipng --iterations=500 --filters=01234mepb --lossy_8bit --lossy_transparent infile.png outfile.png

okay bye bestie 🫢 this was the ZOPFLIPNG(1) page for zopflipng 1.0.3, dated November 2019 β€” go optimize something cute! πŸ’–

πŸ“¦ where this page comes from