Skip to content

Commit

Permalink
deps: Update to usvg 0.43.0 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eoghanmc22 authored Sep 23, 2024
1 parent a84cc29 commit eb95f55
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -83,13 +87,15 @@ 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
[@nixon-voxell]: https://github.com/nixon-voxell
[@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
Expand All @@ -106,4 +112,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
[MSRV]: README.md#minimum-supported-rust-version-msrv
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ 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 = [
"webp",
"png",
"jpeg",
"gif",
Expand Down
3 changes: 2 additions & 1 deletion src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ pub(crate) fn render_group<F: FnMut(&mut Scene, &usvg::Node)>(
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;
Expand Down
3 changes: 3 additions & 0 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit eb95f55

Please sign in to comment.