El dijous, 11 d=E2=80=99abril del 2024, a les 13:07:40 (CEST), Martin Rys v= a escriure: > Hey there, >=20 > 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. >=20 > 200MB may not seem like much, but such files exist there: > * 2MB PNG that reduces to 1MB > * 900KB PNG that reduces to 30KB >=20 > 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. >=20 > 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. >=20 > At the time of writing, it is: > oxipng --zopfli --opt max "${filepath}" I have run=20 find -name *.png | parallel oxipng --opt max --preserve {} \; over trunk I have *not* included --zopfli because the time wasted on it is ridiculous,= =20 e.g. running it over ./l10n-kf6/it/docs/khelpcenter/fundamentals/visualdict-gui1.png goes from 5 seconds to 675 seconds. Cheers, Albert >=20 > Maybe it would be good to also add: > --preserve > Preserve file permissions and timestamps if possible >=20 > 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. >=20 > 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. >=20 > If nobody steps up in a few days, Tosky said they'd give it a try on > the Matrix channel. >=20 > 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. >=20 > Martin