Skip to content

Bintable image integration#43

Open
Fingel wants to merge 3 commits intocds-astro:masterfrom
Fingel:bintable-image-integration
Open

Bintable image integration#43
Fingel wants to merge 3 commits intocds-astro:masterfrom
Fingel:bintable-image-integration

Conversation

@Fingel
Copy link
Copy Markdown
Contributor

@Fingel Fingel commented Mar 26, 2026

Adds support for tile-compressed images to the Image crate format
detection hook, enabling direct to DynamicImage conversion for such
images.

2b3a8fc and 8551e27 are housekeeping that appears to have been missed with the recent additions - tests won't run without them.

d9ea5d0 is the actual implementation. I tried to split the logic out as much as possible. This still smells like the wrong level of abstraction to be doing the actual Image crate integration at, but it's a start.

Question about this:

pub z_naxisn: Box<[usize]>,

Versus:

pub fn get_naxis(&self) -> &[u64] {

To match the get_naxis() method on non-binary table Image, the bintable z_naxisn would be changed to Box<[u64]> instead. That would clean out quite a few casts and make the rgb detection generalizable in the image integration code, removing quite a bit of duplicated code. Though usize does seem more idiomatic for a header value that is meant to be a count, in that case the u64 is strange... not sure which way to go on that.

Thanks for looking!

Fingel added 3 commits March 25, 2026 13:57
Adds support for tile-compressed images to the Image crate format
detection hook, enabling direct to DynamicImage conversion for such
images.
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.

1 participant