Skip to content

Commit

Permalink
chore: version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
hschimke committed Mar 15, 2024
1 parent 9ae4533 commit b3b50b8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 5 additions & 8 deletions src/svg_luminance_source.rs
Original file line number Diff line number Diff line change
@@ -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);

Expand Down Expand Up @@ -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"));
Expand Down

0 comments on commit b3b50b8

Please sign in to comment.