Skip to content

feat: Support loading transparency masks#36

Merged
kylebarron merged 2 commits intomainfrom
kyle/mask-handling
Jan 29, 2026
Merged

feat: Support loading transparency masks#36
kylebarron merged 2 commits intomainfrom
kyle/mask-handling

Conversation

@kylebarron
Copy link
Member

Change list

  • Type Array.mask as NDArray[np.bool_]. I.e. the mask will always be boolean
  • Ensure the mask array is always 2d; i.e. take out the third dimension of 1
  • Fix is_mask_ifd check
  • Add tests to verify against rasterio
  • Bump to async-tiff 0.5.0-beta.1 to include feat!: Handle transparency/nodata bit masks async-tiff#205

"""Check if an IFD is a mask IFD."""
return (
ifd.compression == Compression.deflate
ifd.compression == async_tiff.enums.CompressionMethod.Deflate
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct that all masks must be deflate-compressed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be followed up in #37

@kylebarron kylebarron merged commit 736f58e into main Jan 29, 2026
5 checks passed
@kylebarron kylebarron deleted the kyle/mask-handling branch January 29, 2026 20:58
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