Skip to content

Support single channel f32 tiff files - #2536

Closed
maxall41 wants to merge 6 commits into
image-rs:mainfrom
maxall41:single-channel-support
Closed

maxall41 wants to merge 6 commits into
image-rs:mainfrom
maxall41:single-channel-support

Conversation

@maxall41

Copy link
Copy Markdown

Adds support for single channel f32 tiff files. See #2251.

@fintelia

Copy link
Copy Markdown
Contributor

Thanks for your interest!

Sorry for not getting into the details in the linked PR, but we intentionally limit the number of variants of ColorType and DynamicImage because users have to be able to handle getting any possible variant when they decode an image file. On the other hand, the TIFF format allows a nearly unbounded number of pixel formats including {u8, u16, u32, ..., i8, i16, ..., f16, f32, f64, ...} x {1, 2, 3, 4, ...} samples per pixel, so we have to draw a line.

A big factor to guide that decision has been whether the pixels of a given type would generally represent colors. My understanding is that single channel float TIFFs tend to be used for GIS data or other non-color information, and thus better not to include in ColorType / DynamicImage.

@maxall41

Copy link
Copy Markdown
Author

Ah ok Ill just maintain a fork then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants