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

List:       kde-i18n-doc
Subject:    Re: Help needed to greatly reduce size of SVN repo images.
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2024-04-15 21:10:46
Message-ID: 6881564.3ASIRcOB2E () xps15
[Download RAW message or body]

El dijous, 11 d'abril del 2024, a les 13:07:40 (CEST), Martin Rys va escriure:
> 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}"

I have run 
  find -name *.png | parallel oxipng  --opt max --preserve {} \;
over trunk

I have *not* included --zopfli because the time wasted on it is ridiculous, 
e.g. running it over
   ./l10n-kf6/it/docs/khelpcenter/fundamentals/visualdict-gui1.png
goes from 5 seconds to 675 seconds.

Cheers,
  Albert

> 
> 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