Open Ploppz opened 2 months ago
Short answer is that write_image
internally calls directory.finish()
so you shouldn't call it yourself. The dimensions also get set in write_image
though I think it is harmless to set them a second time. But really we should do an overhaul of the encoding API so that stuff like that is more obvious...
Deleting the directory.finish()
line, I still get the same error.
Deleting the lines setting ImageWidth and ImageHeight, I get error FormatError(RequiredTagNotFound(ImageWidth))
.
I don't have time to look into this right now, but this is how the image
crate uses the TiffEncoder: https://github.com/image-rs/image/blob/d48c6a6ff310b356018ffd6b5daff0d73587c039/src/codecs/tiff.rs#L342
This is more of a request for support. Trying to use this library to create a tiff file and read it:
Error:
That's the last line trying to decode the tiff file. The Tiff file cannot be opened by other programs either.
What am I doing wrong in creation of the file? As you can see I tried RowsPerStrip to disambiguate the layout but it still gives the same error if you uncomment that line.