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

Handle multi picture objects (MPO) #35

Closed
drrelyea opened this issue Oct 5, 2019 · 5 comments
Closed

Handle multi picture objects (MPO) #35

drrelyea opened this issue Oct 5, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@drrelyea
Copy link

drrelyea commented Oct 5, 2019

I have a LOT of images (roughly 1/3 of my entire personal library) that register in PIL as MPO. Your code barfs on all of them, but changing image_utils.py line 15 to IMG_FORMATS = ['JPEG', 'PNG', 'BMP', 'MPO'] fixes this.

I didn't want to submit a PR in case you already know this and it causes a headache somewhere else. If not, please change this.

@prakass1
Copy link

prakass1 commented Oct 6, 2019

Since there are many image formats https://en.wikipedia.org/wiki/Image_file_formats. I think it would be a good idea to provide an option to pass the image file format list via the function call (encode_images) or something.

@tanujjain
Copy link
Collaborator

Thanks for the feedback.

We would try to expand the supported formats. (However, these would be restricted by the formats supported by Pillow library that we're using to load the images)

@drrelyea
Copy link
Author

drrelyea commented Oct 8, 2019 via email

@tanujjain
Copy link
Collaborator

tanujjain commented Oct 8, 2019

Yes, we agree. We wish to take it up as a more involved theme to allow as many image formats as we can. This entails:

  • Figuring out all the image formats we can include.
  • Making the change you suggested.
  • Writing test cases to ensure all the included formats work.

@tanujjain
Copy link
Collaborator

Addressed in PR #57

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

No branches or pull requests

4 participants