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

Respect fill value when saving palette images while keeping the palette. #181

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

gerritholl
Copy link
Contributor

@gerritholl gerritholl commented Aug 22, 2024

When saving palette images with keep_palette=True, respect the fill value like for other images.

Added a test to save a GeoTIFF while keeping the palette and respecting
the fill value.  This test corresponds to issue GH#180.  The test
is currently failing.
When storing mode P images with keep_palette=True, make sure we respect
the fill value replacement.
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.63%. Comparing base (b44e24f) to head (d5b3e23).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   91.61%   91.63%   +0.02%     
==========================================
  Files          11       11              
  Lines        4101     4114      +13     
==========================================
+ Hits         3757     3770      +13     
  Misses        344      344              
Flag Coverage Δ
unittests 91.63% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coveralls
Copy link

coveralls commented Aug 22, 2024

Coverage Status

coverage: 91.881% (+0.03%) from 91.856%
when pulling d5b3e23 on gerritholl:bugfix-fill-value-palette
into ced2ae5 on pytroll:main.

@gerritholl gerritholl marked this pull request as ready for review August 22, 2024 08:36
Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

I have no experience with palettized images, so I only have one question inline. Otherwise LGTM.

trollimage/tests/test_image.py Outdated Show resolved Hide resolved
@pnuu pnuu merged commit 2292d25 into pytroll:main Oct 21, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fill value not respected when saving palette images while keeping palette
3 participants