From 9ed901a11a94f2f605fbd0a95113dd05c45bfc5e Mon Sep 17 00:00:00 2001 From: Wim Pomp Date: Wed, 16 Oct 2024 17:48:58 +0200 Subject: [PATCH] - fix writing pixel size --- Cargo.toml | 4 ++-- src/lib.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 60a450f..0fc528f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "tiffwrite" -version = "2024.10.5" +version = "2024.10.6" edition = "2021" authors = ["Wim Pomp "] -license = "GPLv3" +license = "GPL-3.0-or-later" description = "Write BioFormats/ImageJ compatible tiffs with zstd compression in parallel." homepage = "https://github.com/wimpomp/tiffwrite" repository = "https://github.com/wimpomp/tiffwrite" diff --git a/src/lib.rs b/src/lib.rs index 2df7557..f439708 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -846,6 +846,7 @@ impl IJTiffFile { let r = vec![Rational32::from_f64(px_size).unwrap()]; ifd.tags.insert(Tag::rational(282, &r)); ifd.tags.insert(Tag::rational(283, &r)); + ifd.tags.insert(Tag::short(296, &vec![1])); } if let Colors::Colormap(_) = &self.colors { ifd.tags.insert(Tag::short(262, &vec![3])); @@ -898,10 +899,10 @@ impl IJTiffFile { warn.push((frame_number, 0)); } if warn.len() > 0 { - println!("The following frames were not added to the tif file"); + println!("The following frames were not added to the tif file:"); for (frame_number, channel) in &warn { let (c, z, t) = self.get_czt(*frame_number, *channel, c_size, z_size); - println!("{c}, {z}, {t}") + println!("c: {c}, z: {z}, t: {t}") } println!("Either you forgot them, \ or an error occurred and the tif file was closed prematurely.")