From 6f2d9f89fe34224eb96f609413bc397162dd0fec Mon Sep 17 00:00:00 2001 From: Eoghanmc22 <31516877+Eoghanmc22@users.noreply.github.com> Date: Sun, 8 Sep 2024 01:20:01 +0000 Subject: [PATCH 1/4] Bump usvg from 0.42.0 to 0.43.0 --- Cargo.toml | 2 +- src/render.rs | 3 ++- src/util.rs | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ad45b9d..01535ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ workspace = true [dependencies] vello = { workspace = true } thiserror = "1.0.61" -usvg = "0.42.0" +usvg = "0.43.0" image = { version = "0.25.0", default-features = false, features = [ "png", "jpeg", diff --git a/src/render.rs b/src/render.rs index 7cbe233..1c70674 100644 --- a/src/render.rs +++ b/src/render.rs @@ -102,7 +102,8 @@ pub(crate) fn render_group( match img.kind() { usvg::ImageKind::JPEG(_) | usvg::ImageKind::PNG(_) - | usvg::ImageKind::GIF(_) => { + | usvg::ImageKind::GIF(_) + | usvg::ImageKind::WEBP(_) => { let Ok(decoded_image) = util::decode_raw_raster_image(img.kind()) else { error_handler(scene, node); continue; diff --git a/src/util.rs b/src/util.rs index 1594117..945dee1 100644 --- a/src/util.rs +++ b/src/util.rs @@ -215,6 +215,9 @@ pub fn decode_raw_raster_image( usvg::ImageKind::GIF(data) => { image::load_from_memory_with_format(data, image::ImageFormat::Gif) } + usvg::ImageKind::WEBP(data) => { + image::load_from_memory_with_format(data, image::ImageFormat::WebP) + } usvg::ImageKind::SVG(_) => unreachable!(), }? .into_rgba8(); From 95503dd2efc23c2394246f9c9677b820b4b2bbbd Mon Sep 17 00:00:00 2001 From: Eoghanmc22 Date: Wed, 11 Sep 2024 11:24:55 -0400 Subject: [PATCH 2/4] Add changes to changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e71d9cd..60fe2ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ You can find its changes [documented below](#031-2024-07-29). This release has an [MSRV][] of 1.75. +### Changed + +- Updated to usvg 0.43.0 ([#31] by [@Eoghanmc22]) + ## [0.3.1][] (2024-07-29) This release has an [MSRV][] of 1.75. @@ -106,4 +110,4 @@ This release has an [MSRV][] of 1.75. [0.2.0]: https://github.com/linebender/vello_svg/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/linebender/vello_svg/releases/tag/v0.1.0 -[MSRV]: README.md#minimum-supported-rust-version-msrv \ No newline at end of file +[MSRV]: README.md#minimum-supported-rust-version-msrv From 4040fb7e4ad5cde2a2b97d39bbcc3aef9a6aa21f Mon Sep 17 00:00:00 2001 From: Eoghanmc22 Date: Sun, 15 Sep 2024 21:21:56 -0400 Subject: [PATCH 3/4] Enable webp feature on image crate --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 01535ac..2316a5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,7 @@ vello = { workspace = true } thiserror = "1.0.61" usvg = "0.43.0" image = { version = "0.25.0", default-features = false, features = [ + "webp", "png", "jpeg", "gif", From 3228e5583207cb227b38b23bbe7842fbb26c4fd3 Mon Sep 17 00:00:00 2001 From: Eoghanmc22 <31516877+Eoghanmc22@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:34:17 +0000 Subject: [PATCH 4/4] Fix pr reference in CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60fe2ec..28a229a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ This release has an [MSRV][] of 1.75. - Initial release. ([#1] by [@simbleau]) +[@Eoghanmc22]: https://github.com/Eoghanmc22 [@nicoburns]: https://github.com/nicoburns [@waywardmonkeys]: https://github.com/waywardmonkeys [@simbleau]: https://github.com/simbleau @@ -94,6 +95,7 @@ This release has an [MSRV][] of 1.75. [@MarijnS95]: https://github.com/MarijnS95 [@DasLixou]: https://github.com/DasLixou +[#31]: https://github.com/linebender/vello_svg/pull/31 [#26]: https://github.com/linebender/vello_svg/pull/26 [#28]: https://github.com/linebender/vello_svg/pull/28 [#18]: https://github.com/linebender/vello_svg/pull/18