-
-
Notifications
You must be signed in to change notification settings - Fork 855
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
Processors refactoring #983
Processors refactoring #983
Conversation
Updated master from SixLabors/ImageSharp
Master cleanup (#952)
Changes from master
Changes from master
@Sergio0694 I'll do some work on this later to get it building. Then we'll see where we are. It'll be wise to add a checkbox list to the description here to tick off what you have done so far. |
Hey @JimBobSquarePants - I've just updated the PR description with all the info you requested, hope it helps! 😊 |
@Sergio0694 I got the source building, test still not yet though. If you could get them building I could then crack on with implementing |
Codecov Report
@@ Coverage Diff @@
## master #983 +/- ##
==========================================
+ Coverage 89.71% 89.71% +<.01%
==========================================
Files 1097 1097
Lines 48538 48576 +38
Branches 3421 3421
==========================================
+ Hits 43546 43582 +36
- Misses 4289 4291 +2
Partials 703 703
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #983 +/- ##
==========================================
+ Coverage 89.71% 89.72% +<.01%
==========================================
Files 1097 1097
Lines 48538 48573 +35
Branches 3421 3421
==========================================
+ Hits 43546 43581 +35
Misses 4289 4289
Partials 703 703
Continue to review full report at Codecov.
|
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 could not find any major issue.
Since the changes are consistent, we can merge this as is and continue work in an another PR. @JimBobSquarePants @Sergio0694 how do you want to proceed?
@antonfirsov alright, I've fixed that small leftover you mentioned and marked the PR as ready for review, so you're free to merge this now if you want 👍 |
Ok, let’s merge this as-is then and I’ll open a new PR for using IDisposable since I’ve already made a start. |
* Added new properties to ImageProcessor<TPixel> * Fixed constructors for convolution processors * Fixed constructors for binarization processors * Fixed constructor for dithering processor * Fixed constructors for effects processors * Fixed constructor for filter processor * Fixed constructor for normalization processor * Fixed constructors for overlay processors * Fixed constructor for quantization processor * Fixed constructors for transforms processors * Updated CreatePixelSpecificProcessor<TPixel> definition * Fixed convolution processors creation * Fixed leftover dithering processor constructor * Fixed another leftover dithering processor constructor * Fixed dithering processors creation * Fixed effects processors creation * Fixed filters processor * Fixed normalization processors creation * Fixed overlays processors creation * Fixed quantizer processor creation * Fixed constructors for some remaining processors * Fixed transform processors creation * ImageProcessor class refactored * Renamed some parameters * Convolution processors refactored * Refactored filters and dithering processors * Refactored normalization processors * Overlays processors refactored * Renamed some parameters * CloningImageProcessor class refactored * Transforms processors refactored * Updated DefaultImageProcessingContext class * Src builds, tests still require updating. * Fix tests * Removed unnecessary local variable
Prerequisites
Description
This does some ground work for #967.
I'm creating this as a draft PR as I'm unsure about a couple of things, and there are a few lines that cause the current branch to fail to build. I've done most of the refactoring following step by step the instructions for the "Proposal to refactor current ImageProcessor logic" section.
Need some feedback to continue with this, and of course everyone else is free to just jump in and finish the remaining details as well 😄
What I did so far
Image<TPixel> Source
andRectangle SourceRectangle
asprotected
properties to theImageProcessor<TPixel>
classConfiguration
property (retrieved from the image)ImageProcessor<TPixel>
constructor to take an image and rectangleCreatePixelSpecificProcessor
to take target image and rectangleApply
method, as they're now membersCloningImageProcessor<TPixel>
and inherited processorsImageProcessor<TPixel>
methods (Apply
,BeforeApply
,AfterFrameApply
and all the others)DefaultImageProcessingContext
class to use the new architecture