Hello community, here is the log from the commit of package breeze for openSUSE:Factory checked in at 2020-10-14 11:34:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/breeze (Old) and /work/SRC/openSUSE:Factory/.breeze.new.3486 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "breeze" Wed Oct 14 11:34:36 2020 rev:109 rq:841733 version:5.20.0 Changes: -------- --- /work/SRC/openSUSE:Factory/breeze/breeze.changes 2020-10-13 15:27:50.188821663 +0200 +++ /work/SRC/openSUSE:Factory/.breeze.new.3486/breeze.changes 2020-10-14 11:34:37.927208531 +0200 @@ -1,0 +2,6 @@ +Wed Oct 14 09:15:43 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Add patch and regenerate wallpapers to significantly reduce the size: + * 0001-generate_wallpaper_sizes.py-Properly-compress-wallpa.patch + +------------------------------------------------------------------- New: ---- 0001-generate_wallpaper_sizes.py-Properly-compress-wallpa.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ breeze.spec ++++++ --- /var/tmp/diff_new_pack.JnmsZV/_old 2020-10-14 11:34:38.759207935 +0200 +++ /var/tmp/diff_new_pack.JnmsZV/_new 2020-10-14 11:34:38.759207935 +0200 @@ -33,12 +33,16 @@ Source1: breeze-%{version}.tar.xz.sig Source2: plasma.keyring %endif +# PATCH-FIX-UPSTREAM +Patch1: 0001-generate_wallpaper_sizes.py-Properly-compress-wallpa.patch BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= 0.0.13 BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: kf5-filesystem BuildRequires: pkgconfig +# To regenerate the images for Patch1 +BuildRequires: python3-Pillow # Needed for Plasma/LookAndFeel service type declaration (kde#367923) BuildRequires: plasma-framework BuildRequires: cmake(KDecoration2) >= %{_plasma5_version} @@ -112,9 +116,11 @@ Library containing support code for the Breeze Qt5 style. %prep -%setup -q +%autosetup -p1 %build + # Apply Patch1 + python3 wallpapers/generate_wallpaper_sizes.py %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir} %cmake_build ++++++ 0001-generate_wallpaper_sizes.py-Properly-compress-wallpa.patch ++++++ >From 3f1f58950971791b8deaa7fc63187926aa5dd7b9 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <fab...@ritter-vogt.de> Date: Wed, 14 Oct 2020 11:00:33 +0200 Subject: [PATCH] generate_wallpaper_sizes.py: Properly compress wallpapers The current options are quite bad and result in files which are unnessarily big, even bigger than the original file. The Pillow documentation says: > Values above 95 should be avoided; 100 disables portions of the JPEG > compression algorithm, and results in large files with hardly any gain > in image quality. "100" is not a valid value for the subsamping parameter either. This change actually enables proper compression with subsampling and also enables optimization of internal settings. Result: From 34MiB down to 12MiB with no noticable difference. --- wallpapers/generate_wallpaper_sizes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallpapers/generate_wallpaper_sizes.py b/wallpapers/generate_wallpaper_sizes.py index b5f997b2..79298c7b 100644 --- a/wallpapers/generate_wallpaper_sizes.py +++ b/wallpapers/generate_wallpaper_sizes.py @@ -43,4 +43,4 @@ for orientation in ('horizontal', 'vertical'): else: box = None resized_image = image.resize((width, height), Image.LANCZOS, box) resized_image.save(base_dir / f'{width}x{height}{extension}', - quality=100, subsampling=100) + quality=90, optimize=True, subsampling=1) -- 2.25.1