Enable qoi support now that it's available in rust-image

Now that rust-qoi is packaged and qoi support enabled in rust-image, we
can enable it here as well.
This commit is contained in:
Kalev Lember 2023-08-23 22:35:17 +02:00
parent a1a8bd9084
commit 7e36f5efd4
2 changed files with 12 additions and 38 deletions

View File

@ -28,7 +28,7 @@ License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (MIT OR Apache-2.0) AND
# LICENSE.dependencies contains a full license breakdown
URL: https://gitlab.gnome.org/sophie-h/glycin
Source0: https://download.gnome.org/sources/glycin-loaders/0.1/glycin-loaders-%{tarball_version}.tar.xz
# Fedora-packaged rust-image doesn't have openexr and qoi support
# Fedora-packaged rust-image doesn't have openexr support
Patch: image-rs-missing-decoders.patch
# libheif and jxl rust wrappers aren't packaged yet
Patch: disable-jxl-and-heif-loaders.patch

View File

@ -1,17 +1,14 @@
--- glycin-loaders-0.1.beta.3/loaders/glycin-image-rs/src/bin/glycin-image-rs.rs.orig 2023-08-17 00:08:26.000000000 +0200
+++ glycin-loaders-0.1.beta.3/loaders/glycin-image-rs/src/bin/glycin-image-rs.rs 2023-08-22 13:33:45.045825647 +0200
@@ -141,10 +141,8 @@
--- glycin-loaders-0.1.beta.4/loaders/glycin-image-rs/src/bin/glycin-image-rs.rs.orig 2023-08-23 17:12:04.000000000 +0200
+++ glycin-loaders-0.1.beta.4/loaders/glycin-image-rs/src/bin/glycin-image-rs.rs 2023-08-23 20:42:56.478983578 +0200
@@ -141,7 +141,6 @@
//Hdr(codecs::hdr::HdrDecoder<T>),
Ico(codecs::ico::IcoDecoder<T>),
Jpeg(codecs::jpeg::JpegDecoder<T>),
- OpenExr(codecs::openexr::OpenExrDecoder<T>),
Png(codecs::png::PngDecoder<T>),
Pnm(codecs::pnm::PnmDecoder<T>),
- Qoi(codecs::qoi::QoiDecoder<T>),
Tga(codecs::tga::TgaDecoder<T>),
Tiff(codecs::tiff::TiffDecoder<T>),
WebP(codecs::webp::WebPDecoder<T>),
@@ -164,9 +162,6 @@
Qoi(codecs::qoi::QoiDecoder<T>),
@@ -164,9 +163,6 @@
Self::Ico(codecs::ico::IcoDecoder::new(data).context_failed()?)
}
"image/jpeg" => Self::Jpeg(codecs::jpeg::JpegDecoder::new(data).context_failed()?),
@ -21,38 +18,24 @@
"image/png" => Self::Png(codecs::png::PngDecoder::new(data).context_failed()?),
"image/x-portable-bitmap"
| "image/x-portable-graymap"
@@ -174,7 +169,6 @@
| "image/x-portable-anymap" => {
Self::Pnm(codecs::pnm::PnmDecoder::new(data).context_failed()?)
}
- "image/x-qoi" => Self::Qoi(codecs::qoi::QoiDecoder::new(data).context_failed()?),
"image/x-targa" | "image/x-tga" => {
Self::Tga(codecs::tga::TgaDecoder::new(data).context_failed()?)
}
@@ -196,10 +190,8 @@
@@ -196,7 +192,6 @@
//Self::Hdr(d) => ImageInfo::from_decoder(d, "Radiance HDR"),
Self::Ico(d) => ImageInfo::from_decoder(d, "ICO"),
Self::Jpeg(d) => ImageInfo::from_decoder(d, "JPEG"),
- Self::OpenExr(d) => ImageInfo::from_decoder(d, "OpenEXR"),
Self::Png(d) => ImageInfo::from_decoder(d, "PNG"),
Self::Pnm(d) => ImageInfo::from_decoder(d, "PNM"),
- Self::Qoi(d) => ImageInfo::from_decoder(d, "QOI"),
Self::Tga(d) => ImageInfo::from_decoder(d, "TGA"),
Self::Tiff(d) => ImageInfo::from_decoder(d, "TIFF"),
Self::WebP(d) => ImageInfo::from_decoder(d, "WebP"),
@@ -215,10 +207,8 @@
Self::Qoi(d) => ImageInfo::from_decoder(d, "QOI"),
@@ -215,7 +210,6 @@
//Self::Hdr(d) => Frame::from_decoder(d),
Self::Ico(d) => Frame::from_decoder(d),
Self::Jpeg(d) => Frame::from_decoder(d),
- Self::OpenExr(d) => Frame::from_decoder(d),
Self::Png(d) => Frame::from_decoder(d),
Self::Pnm(d) => Frame::from_decoder(d),
- Self::Qoi(d) => Frame::from_decoder(d),
Self::Tga(d) => Frame::from_decoder(d),
Self::Tiff(d) => Frame::from_decoder(d),
Self::WebP(d) => Frame::from_decoder(d),
--- glycin-loaders-0.1.beta.3/loaders/glycin-image-rs/glycin-image-rs.conf.orig 2023-08-17 00:08:26.000000000 +0200
+++ glycin-loaders-0.1.beta.3/loaders/glycin-image-rs/glycin-image-rs.conf 2023-08-22 13:34:09.831217089 +0200
Self::Qoi(d) => Frame::from_decoder(d),
--- glycin-loaders-0.1.beta.4/loaders/glycin-image-rs/glycin-image-rs.conf.orig 2023-08-23 17:12:04.000000000 +0200
+++ glycin-loaders-0.1.beta.4/loaders/glycin-image-rs/glycin-image-rs.conf 2023-08-23 20:43:10.663228296 +0200
@@ -36,10 +36,6 @@
#[loader:image/vnd.radiance]
#Exec = @EXEC@
@ -64,12 +47,3 @@
# PNM
[loader:image/x-portable-bitmap]
Exec = @EXEC@
@@ -52,8 +48,3 @@
[loader:image/x-portable-anymap]
Exec = @EXEC@
-
-# Qoi's MIME type is being worked on.
-# See: https://github.com/phoboslab/qoi/issues/167
-[loader:image/x-qoi]
-Exec = @EXEC@