Skip to content
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

MITIFF writer using pillow: turn off compression due to rowsperstrip issues #2464

Closed
TAlonglong opened this issue May 5, 2023 · 1 comment · Fixed by #2466
Closed

MITIFF writer using pillow: turn off compression due to rowsperstrip issues #2464

TAlonglong opened this issue May 5, 2023 · 1 comment · Fixed by #2466
Assignees
Labels

Comments

@TAlonglong
Copy link
Collaborator

Feature Request

The satpy mitiff writer uses pillow to write the tiff file with special IMAGEDESCRIPTION tag used by DIANA https://github.com/metno/diana to handle geolocation etc. for visualization.

When compression is applied using pillow number of rowsperstrip is calculated by pillow and not possible to give by the user. https://github.com/python-pillow/Pillow/blob/main/src/PIL/TiffImagePlugin.py#L1721-L1729

DIANA can only handle raw strips, ie. the whole dataset as on strip.

So several solutions is possible.
1: Turn off the hard coded compression in the mitiff writer
2: Use other library than pillow that allow user set rows per strip
3: Implement TIFFReadEncodedStrip in DIANA.

I really, really really don't want to do 3.
For 2, I don't have any idea right now.
So then I end up with 1. This will lead to slighter bigger files, but I think this is acceptable.

Any other ideas before I starting doing this?

Please assign this to me.

@mraspaud
Copy link
Member

mraspaud commented May 5, 2023

Go for 1, it's simple and easy. You can always implement the others later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants