-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support different extend modes using "extend.extend" config item #3556
Conversation
Supported modes are "background", "copy", "mirror", "repeat" which map directly to libvips options
Hi Tomasz, good to hear from you, thank you very much for this. It's interesting that you chose
I generally prefer to map to libvips naming, but we've already deviated with EDIT: After a little more thought, I'm favouring
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is brilliant, thank you again Tomasz. I've left a couple of comments inline and I've given the public API some more thought too with one small change, but otherwise this looks great and is almost ready to go.
I pushed a commit with all the requested changes. Switching to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small error but otherwise this is good to go, thank you.
Thanks again, this will be in v0.32.0. |
This is my attempt at implementing the feature asked for in #3534
@lovell suggested the following API for it:
This PR adds a new config item to
sharp.extend
as specified in the proposal. The supported values forextend.extend
are:background
(colour set from the background property) - this is the current behaviour (default)copy
(copy the image edges)repeat
(repeat the whole image)mirror
(mirror the whole image)