[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Help needed to greatly reduce size of SVN repo images.
From:       Martin Rys <spleefer90 () gmail ! com>
Date:       2024-04-11 11:07:40
Message-ID: CACbE=3oqMGTLDfyqit4tmEHoirxqjdEyyKcEYCz8mSngLhQqsQ () mail ! gmail ! com
[Download RAW message or body]

Hey there,

there are about 3700 PNGs in the SVN repo, totalling 200MB.
I aim to reduce that greatly, losslessly, without losing any data or
quality, while keeping the PNG format.

200MB may not seem like much, but such files exist there:
  * 2MB PNG that reduces to 1MB
  * 900KB PNG that reduces to 30KB

Basically, the total savings are huge, kwin alone loses about 5MB in
total package size on Arch Linux after these optimizations - Arch
ships packages including documentation.

To achieve this, I am in need of someone with a developer account that
can either just send in changed files, or someone who would run oxipng
for every PNG in the repo as per https://rys.rs/optimization if they
have the CPU power and time.

At the time of writing, it is:
  oxipng --zopfli --opt max "${filepath}"

Maybe it would be good to also add:
--preserve
         Preserve file permissions and timestamps if possible

This losslessly optimizes the PNG file, but it is *very* demanding on
CPU time, so it either needs a lot of threads(think threadripper), or
a lot of time, or both.

This does not delete EXIF data (--strip would, not desired).
Wiping EXIF would save some % more, but that is a bit controversial -
we would need to decide what to keep (Author field and possibly more),
it is mildly dangerous, and can always be done later if desired.
The savings from getting rid of EXIF shouldn't be that interesting in
the end, unless something is wrong and there is excessive metadata
stored, I have not looked if that is the case yet.

If nobody steps up in a few days, Tosky said they'd give it a try on
the Matrix channel.

P.S. Yes, there are images in the translations repo! They are mostly
screenshots of UI for the given localization. They are used sparsely,
maybe an entirely different, automated system to create them would be
a good idea, maybe with a switch to SVG/JXL to save on size, but the
aim of this thread is to reduce size of the currently existing PNGs.

Martin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic