From 4bb228073ae237768eab34d645f87a111a3f4846 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Thu, 16 Mar 2023 14:01:31 -0500 Subject: [PATCH] fix rotation regression for Luma8 part of #27. This is an issue with get_matrix after a rotation. --- Cargo.toml | 2 +- src/luma_luma_source.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0e4cfb2..072219f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rxing" -version = "0.4.0" +version = "0.4.1" description="A rust port of the zxing barcode library." license="Apache-2.0" repository="https://github.com/rxing-core/rxing" diff --git a/src/luma_luma_source.rs b/src/luma_luma_source.rs index bc98443..12e4ec4 100644 --- a/src/luma_luma_source.rs +++ b/src/luma_luma_source.rs @@ -134,7 +134,8 @@ impl Luma8LuminanceSource { } } self.data = new_data; - self.dimensions = new_dim + self.dimensions = new_dim; + self.original_dimension = (self.original_dimension.1, self.original_dimension.0); } fn transpose(&mut self) {