Skip to content

Add support for 3 TIFF compression modes#2970

Merged
joeyballentine merged 1 commit intochaiNNer-org:mainfrom
RunDevelopment:save-tiff-compression
Jul 1, 2024
Merged

Add support for 3 TIFF compression modes#2970
joeyballentine merged 1 commit intochaiNNer-org:mainfrom
RunDevelopment:save-tiff-compression

Conversation

@RunDevelopment
Copy link
Member

Progress towards #2950.

This PR adds support for None, LZW, and ZIP compression for 8 and 16 bit images. This is the best that OpenCV would let me do.

image


So OpenCV's TIFF compression is completely fucked. Not only did they forget to define the enum constants for TIFF compression modes, the compression modes themselves don't really work. E.g. it says that it support a JPEG compression mode, but this mode always errors no matter what I do. For 32 bit, OpenCV only supports a single compression mode. Not even NONE is an option.

Copy link
Member

@joeyballentine joeyballentine left a comment

Choose a reason for hiding this comment

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

Maybe in the future we can use the image crate's tiff encoding. I'm guessing it's probably better than opencv 😆

@joeyballentine joeyballentine merged commit 067885b into chaiNNer-org:main Jul 1, 2024
@RunDevelopment RunDevelopment deleted the save-tiff-compression branch July 1, 2024 12:18
@RunDevelopment
Copy link
Member Author

Maybe in the future we can use the image crate's tiff encoding. I'm guessing it's probably better than opencv 😆

I just looked, and it looks like it has even fewer features :(

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.

2 participants