Fix warp_perspective/straighten_perspective :extend_mode silent no-op and correct its docs#203
Merged
kipcole9 merged 1 commit intoJun 30, 2026
Conversation
Collaborator
|
Wow, you're doing some amazing and truly appreciated work. Thank you. I will consolidate all your work and get a new release out by my Wednesday morning (UTC+10). |
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.
Fixes the
:extend_modeoption onwarp_perspective/straighten_perspective, which was silently a no-op.Root cause:
Image.Options.WarpPerspectivevalidated:extend_modeand passed it straight through toVix.Vips.Operation.mapim/3, but the operation's option is named:extend.mapimsilently ignores unknown options, so the value never took effect, and output was always rendered withmapim's own default (extend: background).Image.Options.WarpPerspectivenow renames:extend_modeto:extendduring validation, so the value reachesmapim/3.:extend_modechanged from:blackto:background. The configured:blackwas never actually in use. The actual rendered default wasmapim'sbackground. Setting the configured default to:backgroundkeeps output at the default identical to before.:extend_modedocs onwarp_perspective/4,warp_perspective!/4,straighten_perspective/3andstraighten_perspective!/3. Likeaffine,mapim's extend only colours the thin antialiased fringe at the resampled content edge, not the uncovered canvas (which is filled by:background).Anyone who has explicitly set
:extend_modeto a value other than:backgroundwill see changes to the fringes around the resampled content.