-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
Convolution: Border wrapping modes #2060
Convolution: Border wrapping modes #2060
Conversation
src/ImageSharp/Processing/Processors/Convolution/BorderWrappingMode.cs
Outdated
Show resolved
Hide resolved
src/ImageSharp/Processing/Processors/Convolution/KernelSamplingMap.cs
Outdated
Show resolved
Hide resolved
src/ImageSharp/Processing/Processors/Convolution/KernelSamplingMap.cs
Outdated
Show resolved
Hide resolved
src/ImageSharp/Processing/Processors/Convolution/KernelSamplingMap.cs
Outdated
Show resolved
Hide resolved
src/ImageSharp/Processing/Processors/Convolution/KernelSamplingMap.cs
Outdated
Show resolved
Hide resolved
Oh wow! This is a pleasant surprise! I never looked at this after refactoring convolution so thought the changes would still be really viral. |
src/ImageSharp/Processing/Processors/Convolution/BorderWrappingMode.cs
Outdated
Show resolved
Hide resolved
Please let me know if there is anything missing in this PR. |
Will do. We’re currently investigating some access violation issues #2075 that we need to resolve before we merge any more code. |
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.
I think we can get this merged now. Thanks for your patience @ynse01 this is an awesome addition to the library!
Prerequisites
Description
I went through the somewhat older issues and found #427 to be of my interest to implement.
This PR creates three modes in which to treat the border pixels in a Convolution operation. These modes are:
I don't like the
None
name proposal in the original issue, as I feel you have to make a choice about your borders. And with the nameClamp
we make clear what operation we perform.Please advise on how to expose this in the public Convolution API's.
For example, please specify your preference on questions like:
BorderWrappingMode
property ?Clamp
toMirror
?Other feedback or suggestion are also welcome !