New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rgb64FImage and Rgba64FImage #1802
base: main
Are you sure you want to change the base?
Conversation
Could you say a bit about what use cases you have for 64-bit floating point images? |
I'm fiddling around with astrophotography stacking. I need to perform operations on tens on thousands of images. In that order float imprecision errors start to creep up. To reduce these losses, I'd like to work on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me, it doesn't complicate color representation too much and conversion where it was previously possible with f32
should work. LGTM.
I looked at this a bit more closely. It is already possible to work with 64-bit ImageBuffers either by writing out the full type name or by defining The main thing this PR adds is a |
The traits The concern about |
Before creating this PR, I did in fact write my own In my particular use-case I was missing image conversion from Regarding adding As FITS support is still quite a way in the future, I'd be fine with leaving out |
Adding an I view More unusual color types can be used by interacting with the format specific crates directly, like how the TIFF crate already supports 64-bit float images. If applicable, we can also have decoders/encoders transparently convert images in unsupported color types into ones we do support. (You could argue this is happening with JPEG when YCbCr colors get mapped to RGB.) In the case of Pillow, I believe that this is the analogous listing of color types. |
I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to choose either at their option.