public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ryan Brue <ryanbrue.dev@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/cosmic-settings] f43: JXL Updates to cosmic settings
Date: Thu, 08 Oct 2026 16:00:39 GMT [thread overview]
Message-ID: <179147523909.1.4538145898600597399.rpms-cosmic-settings-291a115496b7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/cosmic-settings
Branch : f43
Commit : 291a115496b7d1b11091918ab15a09c5b593a9c0
Author : Ryan Brue <ryanbrue.dev@gmail.com>
Date : 2025-08-20T13:30:59-05:00
Stats : +302/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/cosmic-settings/c/291a115496b7d1b11091918ab15a09c5b593a9c0?branch=f43
Log:
JXL Updates to cosmic settings
---
diff --git a/0001-fix-use-image-feature-of-jxl-oxide-to-fix-image-deco.patch b/0001-fix-use-image-feature-of-jxl-oxide-to-fix-image-deco.patch
new file mode 100644
index 0000000..186a08c
--- /dev/null
+++ b/0001-fix-use-image-feature-of-jxl-oxide-to-fix-image-deco.patch
@@ -0,0 +1,300 @@
+From 092bb57e7f550226ae61f426a94fb8df7bc78ed9 Mon Sep 17 00:00:00 2001
+From: Michael Aaron Murphy <michael@mmurphy.dev>
+Date: Mon, 18 Aug 2025 16:11:13 +0200
+Subject: [PATCH] fix: use image feature of jxl-oxide to fix image decoding
+ error
+
+---
+ Cargo.lock | 60 +++++++++++++++---------------
+ pages/wallpapers/Cargo.toml | 2 +-
+ pages/wallpapers/src/lib.rs | 74 +++++--------------------------------
+ 3 files changed, 41 insertions(+), 95 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 4866d59..06e9f8c 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -940,9 +940,9 @@ dependencies = [
+
+ [[package]]
+ name = "brotli-decompressor"
+-version = "4.0.3"
++version = "5.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd"
++checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
+ dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+@@ -4181,18 +4181,18 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-bitstream"
+-version = "0.6.0"
++version = "1.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "f4587c2166a289ef21075fbf58e19d898f23833bd4d78691db36cdf0eee7f6cf"
++checksum = "eda699770a7f4ea38f8eb21d91b545eb6448be28e540acc7ce84498bcead4903"
+ dependencies = [
+ "tracing",
+ ]
+
+ [[package]]
+ name = "jxl-coding"
+-version = "0.6.0"
++version = "1.0.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "2e8cf24db1cec3d7e703df9f5ef3f3b49650607432792ca988b66dd17bb640b2"
++checksum = "cd972bcd125e776f1eb241ac50e39f956095a1c2770c64736c968f8946bd9a3c"
+ dependencies = [
+ "jxl-bitstream",
+ "tracing",
+@@ -4200,13 +4200,14 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-color"
+-version = "0.10.2"
++version = "0.11.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "2d93855433a33d6d06ba412e09438631d2fe4828c119dd1f4c6ba9e0c3d5988c"
++checksum = "f316b1358c1711755b3ee8e8cb5c4a1dad12e796233088a7a513440782de80b2"
+ dependencies = [
+ "jxl-bitstream",
+ "jxl-coding",
+ "jxl-grid",
++ "jxl-image",
+ "jxl-oxide-common",
+ "jxl-threadpool",
+ "tracing",
+@@ -4214,9 +4215,9 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-frame"
+-version = "0.12.1"
++version = "0.13.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "e53d24902e27ca7af5424a80955f88d82b9d7dae88f12169a2584470bbbfe75c"
++checksum = "2d967c6fd669c7c01060b5022d8835fa82fd46b06ffc98b549f17600a097c2b3"
+ dependencies = [
+ "jxl-bitstream",
+ "jxl-coding",
+@@ -4231,21 +4232,20 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-grid"
+-version = "0.5.3"
++version = "0.6.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "5739f02add3d5c00320140bec6f5a80fac4baa630f88fe4c6a55a0d719718ce3"
++checksum = "a0e0ef92d5d60e76bf41098e57e985f523185e08fad54268da448637feca6989"
+ dependencies = [
+ "tracing",
+ ]
+
+ [[package]]
+ name = "jxl-image"
+-version = "0.12.0"
++version = "0.13.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "5199f6bce2f64494b91c510dfdeb8035bb405f6347837b6293e9eeb9d93f246b"
++checksum = "c5f752d62577c702a94dbbce4045caf08cb58639e8a4d56464b40ecf33ffe565"
+ dependencies = [
+ "jxl-bitstream",
+- "jxl-color",
+ "jxl-grid",
+ "jxl-oxide-common",
+ "tracing",
+@@ -4253,9 +4253,9 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-jbr"
+-version = "0.1.1"
++version = "0.2.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "56cbdbec115aa2f0b22ca3719dec2902b4c75da904cda7a2cdfc21df21b44f24"
++checksum = "e35d032bcec660647828527ff42c6f5776d2fd44b8357f9f6d9ac6dc07218e46"
+ dependencies = [
+ "brotli-decompressor",
+ "jxl-bitstream",
+@@ -4271,9 +4271,9 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-modular"
+-version = "0.10.0"
++version = "0.11.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "9d4852fe37dee35f67b2e3912c3eecb7d053379aac0801b5cc489d58ea253af1"
++checksum = "da758b2f989aafd9eeb39489fe43d7be5a3a0d2ad61cf1bad705eb6990a6053c"
+ dependencies = [
+ "jxl-bitstream",
+ "jxl-coding",
+@@ -4285,11 +4285,13 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-oxide"
+-version = "0.11.4"
++version = "0.12.4"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "91c7a16be632403a5653bae89734e119cc2098ba16b269917cbf9481e05e3166"
++checksum = "fa635162d7d53c650ae9e429a4e354ac1d63f0d3b1bdd1991b400c22cd301a6d"
+ dependencies = [
+ "brotli-decompressor",
++ "bytemuck",
++ "image",
+ "jxl-bitstream",
+ "jxl-color",
+ "jxl-frame",
+@@ -4304,18 +4306,18 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-oxide-common"
+-version = "0.2.0"
++version = "1.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "8ccfd9c5f3807b9dbd0797788a577171bd78f5169a36f4bc3c7bbceaf3991507"
++checksum = "b62394c5021b3a9e7e0dbb2d639d555d019090c9946c39f6d3b09d390db4157b"
+ dependencies = [
+ "jxl-bitstream",
+ ]
+
+ [[package]]
+ name = "jxl-render"
+-version = "0.11.3"
++version = "0.12.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "9009fe6db8604352b60dc53f5cb37f765196e498238b040d42b16288417328fa"
++checksum = "aa0c3100918bd3c41bb0f8ce1f4f1664e48f3032ff8eeab0d6a2cfc3276f462d"
+ dependencies = [
+ "bytemuck",
+ "jxl-bitstream",
+@@ -4333,9 +4335,9 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-threadpool"
+-version = "0.1.2"
++version = "1.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "ad9c78eaf899cce165e266300f9963d8d376d4ed95cf4d12dd7066f05542cd88"
++checksum = "25f15eb830aa77a7f21148d72e153562a26bfe570139bd4922eab1908dd499d3"
+ dependencies = [
+ "rayon",
+ "rayon-core",
+@@ -4344,9 +4346,9 @@ dependencies = [
+
+ [[package]]
+ name = "jxl-vardct"
+-version = "0.10.1"
++version = "0.11.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "0c98211ffd56bbcbbdd501f396855123d21008304786b8b11d959a5620e86eb1"
++checksum = "ce72a18c6d3a47172ab6c479be2bdb56f22066b5d7092663f03b4490820b4511"
+ dependencies = [
+ "jxl-bitstream",
+ "jxl-coding",
+diff --git a/pages/wallpapers/Cargo.toml b/pages/wallpapers/Cargo.toml
+index ff88d5c..6feb077 100644
+--- a/pages/wallpapers/Cargo.toml
++++ b/pages/wallpapers/Cargo.toml
+@@ -20,6 +20,6 @@ futures-lite = "2.6.0"
+ futures-util = "0.3.31"
+ image = "0.25.5"
+ infer = "0.16.0"
+-jxl-oxide = "0.11.3"
++jxl-oxide = { version = "0.12.4", features = ["image"] }
+ tokio = { version = "1.44.1", features = ["sync"] }
+ tracing = "0.1.41"
+diff --git a/pages/wallpapers/src/lib.rs b/pages/wallpapers/src/lib.rs
+index b328369..87f7d60 100644
+--- a/pages/wallpapers/src/lib.rs
++++ b/pages/wallpapers/src/lib.rs
+@@ -4,7 +4,8 @@ use fast_image_resize::SrcCropping;
+ use futures_lite::Stream;
+ use image::imageops::FilterType;
+ use image::{DynamicImage, ImageBuffer, Rgba, RgbaImage};
+-use jxl_oxide::{EnumColourEncoding, JxlImage, PixelFormat};
++use jxl_oxide::integration::JxlDecoder;
++use std::fs::File;
+ use std::os::unix::ffi::OsStrExt;
+ use std::{
+ borrow::Cow,
+@@ -442,70 +443,13 @@ fn border_radius(
+
+ /// Decodes JPEG XL image files into `image::DynamicImage` via `jxl-oxide`.
+ pub fn decode_jpegxl(path: &std::path::Path) -> eyre::Result<DynamicImage> {
+- let mut image = JxlImage::builder()
+- .open(path)
+- .map_err(|why| eyre!("failed to read image header: {why}"))?;
+- image.request_color_encoding(EnumColourEncoding::srgb(
+- jxl_oxide::RenderingIntent::Relative,
+- ));
+- let render = image
+- .render_frame(0)
+- .map_err(|why| eyre!("failed to render image frame: {why}"))?;
+-
+- let framebuffer = render.image_all_channels();
+- match image.pixel_format() {
+- PixelFormat::Graya => image::GrayAlphaImage::from_raw(
+- framebuffer.width() as u32,
+- framebuffer.height() as u32,
+- framebuffer
+- .buf()
+- .iter()
+- .map(|x| x * 255. + 0.5)
+- .map(|x| x as u8)
+- .collect::<Vec<_>>(),
+- )
+- .map(DynamicImage::ImageLumaA8)
+- .ok_or_eyre("Can't decode gray alpha buffer"),
+- PixelFormat::Gray => image::GrayImage::from_raw(
+- framebuffer.width() as u32,
+- framebuffer.height() as u32,
+- framebuffer
+- .buf()
+- .iter()
+- .map(|x| x * 255. + 0.5)
+- .map(|x| x as u8)
+- .collect::<Vec<_>>(),
+- )
+- .map(DynamicImage::ImageLuma8)
+- .ok_or_eyre("Can't decode gray buffer"),
+- PixelFormat::Rgba => image::RgbaImage::from_raw(
+- framebuffer.width() as u32,
+- framebuffer.height() as u32,
+- framebuffer
+- .buf()
+- .iter()
+- .map(|x| x * 255. + 0.5)
+- .map(|x| x as u8)
+- .collect::<Vec<_>>(),
+- )
+- .map(DynamicImage::ImageRgba8)
+- .ok_or_eyre("Can't decode rgba buffer"),
+- PixelFormat::Rgb => image::RgbImage::from_raw(
+- framebuffer.width() as u32,
+- framebuffer.height() as u32,
+- framebuffer
+- .buf()
+- .iter()
+- .map(|x| x * 255. + 0.5)
+- .map(|x| x as u8)
+- .collect::<Vec<_>>(),
+- )
+- .map(DynamicImage::ImageRgb8)
+- .ok_or_eyre("Can't decode rgb buffer"),
+- //TODO: handle this
+- PixelFormat::Cmyk => Err(eyre!("unsupported pixel format: CMYK")),
+- PixelFormat::Cmyka => Err(eyre!("unsupported pixel format: CMYKA")),
+- }
++ let file = File::open(path).map_err(|why| eyre!("failed to open jxl image file: {why}"))?;
++
++ let decoder =
++ JxlDecoder::new(file).map_err(|why| eyre!("failed to read jxl image header: {why}"))?;
++
++ image::DynamicImage::from_decoder(decoder)
++ .map_err(|why| eyre!("failed to decode jxl image: {why}"))
+ }
+
+ /// Use `fast-image-resize` crate for faster thumbnail generation.
+--
+2.50.1
+
diff --git a/cosmic-settings.spec b/cosmic-settings.spec
index 754522a..817dc12 100644
--- a/cosmic-settings.spec
+++ b/cosmic-settings.spec
@@ -31,6 +31,7 @@ Source1: vendor-%{version_no_tilde}.tar.gz
# * mv vendor-config-%%{version_no_tilde}.toml ..
Source2: vendor-config-%{version_no_tilde}.toml
+Patch: 0001-fix-use-image-feature-of-jxl-oxide-to-fix-image-deco.patch
BuildRequires: cargo-rpm-macros >= 25
BuildRequires: rustc
diff --git a/sources b/sources
index 6f5cda1..fe5c5e4 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
SHA512 (cosmic-settings-1.0.0-alpha.7.tar.gz) = 1b7458a28461295dcdd4841606e703996776f4ed7a1505e78e60b9428533e8ef3fa5578dd85e065481243e37cc69cedc2b63f12cacc0fe70be51c07b58b7b49b
-SHA512 (vendor-1.0.0-alpha.7.tar.gz) = b8e70a66c782e3ed1838f1fbf2a1d33bb301e3b43549c870c8fcbcdf8fcdafadb81bd93e857fe4e054874eb0821b80372de17a7779488eaef4c4e10c20c3644a
+SHA512 (vendor-1.0.0-alpha.7.tar.gz) = 196d2721fb86857f85517ae8118f1584c9a6f1a60aa091f52123daee1598eab1efa484e3f1a3bbf048be10a90b387f0a39e0f0fc54fe4543b585f8363f54b829
reply other threads:[~2026-10-08 16:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179147523909.1.4538145898600597399.rpms-cosmic-settings-291a115496b7@fedoraproject.org \
--to=ryanbrue.dev@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox