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

Added support for monochrome images decoding #215

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

bigcat88
Copy link
Owner

Changes proposed in this pull request:

  • if image is monochrome, from now it will be ALWAYS opened in native mode, if it is 8 bit then it is L if HDR then I;16
  • info["chroma"] now filled for images that contains such information, can be used during save
  • updated Test Images with correct data, some of them L_8_29x...heic were saved not in monochrome mode.

If your code expects only RGB images as input, then from this release you need to convert monochrome to RGB, fortunately this is easy to do with Pillow.

There will be no support for monochrome images with the Alpha channel until Pillow starts supporting HDR images, in the current situation there is already enough unnecessary code just because Pillow does not support HDR.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9f4acd0) to head (df6f18f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #215   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          927       936    +9     
=========================================
+ Hits           927       936    +9     
Files Coverage Δ
pillow_heif/as_plugin.py 100.00% <100.00%> (ø)
pillow_heif/heif.py 100.00% <100.00%> (ø)
pillow_heif/misc.py 100.00% <100.00%> (ø)

@bigcat88 bigcat88 merged commit ed772d4 into master Feb 27, 2024
29 checks passed
@bigcat88 bigcat88 deleted the feat-read-monochrome-img branch February 27, 2024 16:25
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