Repository navigation
Fix #8795 gmt image -I inversion - #8837
Merged
seisman merged 2 commits intoDec 10, 2025
Merged
Conversation
…8795) - Detect 2-color (1-bit) images and swap colormap entries when -I is used - Apply -G color replacements to colormap before expansion to RGB - Ensures -I option works correctly for 1-bit PNG images Fixes GenericMappingTools#8795
) - Tests normal image, inverted image, and inverted with color changes - Verifies fix for issue GenericMappingTools#8795
joa-quim
approved these changes
Dec 9, 2025
joa-quim
left a comment
Member
There was a problem hiding this comment.
I run the tests locally and this worked, thanks. But for committing, an "original" PS file must be submitted to the DVC otherwise the new test will always fail (and please don't ask me how to. I hate the DVC, it never works for me).
Member
|
I can confirm that it works. I'll add the baseline image later. |
seisman
added a commit
that referenced
this pull request
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
Png bit map images are converted to 24-bit internally and this conversion seemed to be confusing the -I logic. For a 2-color color map image, the logic was adjusted so treat the 2-color color map image as a bitmap image and also support replacing the foreground and background colors.