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

Image write compression and dtype #32

Closed
MWieland opened this issue May 25, 2020 · 1 comment · Fixed by #38 or #46
Closed

Image write compression and dtype #32

MWieland opened this issue May 25, 2020 · 1 comment · Fixed by #38 or #46
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@MWieland
Copy link
Collaborator

The Image.write_to_file() method could be expanded to support optional image compression (e.g. Packbits or LZW). This is necessary to reduce the storage space for example when saving binary masks to disk.

To achieve this we basically would have to update the profile with "compress" and optionally also "nbits" attributes. Beyond this, the "tiled" attribute could be useful to support.

Also this method defines as default dtype uint16. It would be more reasonable to set the default dtype to the dtype of the Image array in my opinion. This would allow us to stay consistent between image loading and writing.

@MWieland MWieland added the enhancement New feature or request label May 25, 2020
@fwfichtner
Copy link
Contributor

Good point, these options should have been in there from the beginning.

@fwfichtner fwfichtner added the good first issue Good for newcomers label May 25, 2020
@fwfichtner fwfichtner self-assigned this May 27, 2020
fwfichtner added a commit that referenced this issue May 27, 2020
@fwfichtner fwfichtner mentioned this issue May 27, 2020
@fwfichtner fwfichtner reopened this Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants