From b3b50b87694c2216bd8635ef75f1d1333cded015 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Fri, 15 Mar 2024 11:49:42 -0500 Subject: [PATCH] chore: version bump --- Cargo.toml | 2 +- README.md | 1 + crates/cli/Cargo.toml | 8 ++++---- src/svg_luminance_source.rs | 13 +++++-------- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b5c24882..d899c706 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rxing" -version = "0.5.7" +version = "0.5.8" description="A rust port of the zxing barcode library." license="Apache-2.0" repository="https://github.com/rxing-core/rxing" diff --git a/README.md b/README.md index 5b29054b..7829b414 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ fn main() { ``` ## Latest Release Notes +* *v0.5.8* -> Performance improvements. Memory Improvements. Added FilteredReader which performs a more complicated operation on images (resizes and closes binary bitmaps) at the expense of some performance. * *v0.5.5* -> Add support for rMQR, allows building the library without image_formats, fixes an issue with multiple barcode detection. New default feature flag `image_formats` enables all of the `image` crates image formats for use. diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 22b07a81..125bbc58 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "rxing-cli" -version = "0.1.20" +version = "0.1.21" edition = "2021" description = "A command line interface for rxing supporting encoding and decoding of multiple barcode formats" license="Apache-2.0" repository="https://github.com/rxing-core/rxing/tree/main/crates/cli" -keywords = ["barcode", "2d_barcode", "1d_barcode", "barcode_reader", "barcode_writer"] +keywords = ["barcode", "barcode_1d", "barcode_2d", "barcode_reader", "barcode_writer"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "4.4.13", features = ["derive"] } -rxing = {path = "../../", version = "~0.5.7", features = ["image", "svg_read", "svg_write"] } +clap = { version = "4.5.3", features = ["derive"] } +rxing = {path = "../../", version = "~0.5.8", features = ["image", "svg_read", "svg_write"] } #[profile.release] #debug = true \ No newline at end of file diff --git a/src/svg_luminance_source.rs b/src/svg_luminance_source.rs index 02dd03f0..bf4f8a76 100644 --- a/src/svg_luminance_source.rs +++ b/src/svg_luminance_source.rs @@ -1,8 +1,7 @@ use crate::common::Result; use crate::{BufferedImageLuminanceSource, Exceptions, LuminanceSource}; use image::{DynamicImage, RgbaImage}; -use resvg::usvg::TreeParsing; -use resvg::{self, usvg::Options}; +use resvg::{self, usvg, usvg::Options}; pub struct SVGLuminanceSource(BufferedImageLuminanceSource); @@ -67,18 +66,16 @@ impl SVGLuminanceSource { }; let Some(mut pixmap) = - resvg::tiny_skia::Pixmap::new(tree.size.width() as u32, tree.size.height() as u32) + resvg::tiny_skia::Pixmap::new(tree.size().width() as u32, tree.size().height() as u32) else { return Err(Exceptions::format_with("could not create pixmap")); }; - let tree_resvg = resvg::Tree::from_usvg(&tree); - - tree_resvg.render(resvg::tiny_skia::Transform::default(), &mut pixmap.as_mut()); + resvg::render(&tree,resvg::tiny_skia::Transform::default(),&mut pixmap.as_mut() ); let Some(buffer) = RgbaImage::from_raw( - tree.size.width() as u32, - tree.size.height() as u32, + tree.size().width() as u32, + tree.size().height() as u32, pixmap.data().to_vec(), ) else { return Err(Exceptions::format_with("could not create image buffer"));