- fix writing pixel size
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tiffwrite"
|
name = "tiffwrite"
|
||||||
version = "2024.10.5"
|
version = "2024.10.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Wim Pomp <w.pomp@nki.nl>"]
|
authors = ["Wim Pomp <w.pomp@nki.nl>"]
|
||||||
license = "GPLv3"
|
license = "GPL-3.0-or-later"
|
||||||
description = "Write BioFormats/ImageJ compatible tiffs with zstd compression in parallel."
|
description = "Write BioFormats/ImageJ compatible tiffs with zstd compression in parallel."
|
||||||
homepage = "https://github.com/wimpomp/tiffwrite"
|
homepage = "https://github.com/wimpomp/tiffwrite"
|
||||||
repository = "https://github.com/wimpomp/tiffwrite"
|
repository = "https://github.com/wimpomp/tiffwrite"
|
||||||
|
|||||||
@@ -846,6 +846,7 @@ impl IJTiffFile {
|
|||||||
let r = vec![Rational32::from_f64(px_size).unwrap()];
|
let r = vec![Rational32::from_f64(px_size).unwrap()];
|
||||||
ifd.tags.insert(Tag::rational(282, &r));
|
ifd.tags.insert(Tag::rational(282, &r));
|
||||||
ifd.tags.insert(Tag::rational(283, &r));
|
ifd.tags.insert(Tag::rational(283, &r));
|
||||||
|
ifd.tags.insert(Tag::short(296, &vec![1]));
|
||||||
}
|
}
|
||||||
if let Colors::Colormap(_) = &self.colors {
|
if let Colors::Colormap(_) = &self.colors {
|
||||||
ifd.tags.insert(Tag::short(262, &vec![3]));
|
ifd.tags.insert(Tag::short(262, &vec![3]));
|
||||||
@@ -898,10 +899,10 @@ impl IJTiffFile {
|
|||||||
warn.push((frame_number, 0));
|
warn.push((frame_number, 0));
|
||||||
}
|
}
|
||||||
if warn.len() > 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 {
|
for (frame_number, channel) in &warn {
|
||||||
let (c, z, t) = self.get_czt(*frame_number, *channel, c_size, z_size);
|
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, \
|
println!("Either you forgot them, \
|
||||||
or an error occurred and the tif file was closed prematurely.")
|
or an error occurred and the tif file was closed prematurely.")
|
||||||
|
|||||||
Reference in New Issue
Block a user