Images 💾

Last commit ⭐

commit 28af4aa4ff3551d6befb8cbe3e3e62950927a52a
Author:     Nico Weber <thakis@chromium.org>
AuthorDate: Tue Jul 30 20:53:22 2024 -0700
Commit:     Nico Weber <thakis@chromium.org>
CommitDate: Wed Jul 31 18:39:08 2024 -0700

    LibGfx/PNGWriter: Change default PNG compression level to Default
    
    The numbers in the previous commit show that going from n = 2 to
    n = 3 comes with a big cost in runtime (3-4 times as long) for a
    very modest to modest size win (0.5% to 2.5%). The jumps from n = 0
    to n = 1 and from n = 1 to n = 2 look much more reasonable.
    
    If image size is the main concern, webp is a better option now.
    If PNG size is a big concern, recompressing with something like
    zopflipng is currently still necessary anyways.
    
    All in all, I think Default is the better default compression level now.
    
    This effectively reverts #14738.
    
    Affects PNGs written by all apps in the system (PixelPaint, Mandelbrot,
    LibWeb's HTMLCanvasElement png serialization, LibWeb's screenshot
    feature, `shot`, SpiceAgent, Magnify, `pdf` output, `image` without
    --png-compression-level flag).