Sergio Pedri
f25c68304d
Processors refactoring ( #983 )
* 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
7 years ago
Simon Cropp
2c04d6b036
redundant usings ( #960 )
7 years ago
James Jackson-South
5abca49055
Master cleanup ( #952 )
* Fix gitignore and line endings
* Update README.md
7 years ago
Anton Firszov
17a4d91b82
clean-up drawing processors
7 years ago
Anton Firszov
0f823b9b4a
non-generic DrawImageProcessor
7 years ago
Anthony Truskinger
764a73b631
Now throws a better excpetion DrawImage source does not overlap target ( #877 )
* No longer throws when DrawImage source does not overlap target
Previously, when DrawImage was used to overlay an image, in cases where the source image did not overlap the target image, a very confusing error was reported: "System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: MaxDegreeOfParallelism"
Now, when this case happens, the DrawImage method will simply not affect the target image, which is the same way FillRegionProcessor handles such cases.
ParallelHelper.IterRows also now does more validation of the input rectangle so that any further cases of this kind of problem throw a more relvant exception. Note I switched from DebugGuard to Guard because IterRows is a public API and thus should always validate its inputs.
Fixes #875
* Refines DrawImage non-overlap error logic
Adresses PR feedback in #877 .
Changes DrawImage shortcut to be less than or equal to. Also changes maxX calculation to use `Right` over `Width`. This is a semantic change that reflects intention better. No actual change because Top,Left for that rectanngle should always be 0,0.
And adds more informative argument names to ParallelHelper.IterRows error message.
* Non-overlapping DrawImage now throws
Adressing PR feedback from #877
DrawImage now throws when the source image does not overlap, with a useful error message.
Also improved the error messages for IterRows (and added validation to the other IterRows method)
* DrawImage overlap test changed to support RELEASE
The tests on the CI server are run in RELEASE which wrap the expected exception with an ImageProcessingException.
* Adress feedback for DrawImage exception
DrawImage throws an ImageProcessor exception which makes it easier to catch.
And reverted IterRows to use Guard helpers
7 years ago
Anton Firszov
492d2d6b10
pass Configuration to Vector4 converters in PixelOperations
7 years ago
Anton Firszov
20ff3ab0a1
fix typo, improve DivideCeil
7 years ago
Anton Firszov
7277ca2a29
DrawImageProcessor + formatting
7 years ago
Vicente Penades
4a791cc516
Refactored PixelBlenders so it generates much less code and allows for two loop variations.
Generalised DrawingImage methods to support drawing images with a format different than the destination image at no cost.
8 years ago
Vicente Penades
b005d24789
rearranged DrawImage method arguments. Fixed tests accordingly
8 years ago
Vicente Penades
324cb09452
refactored DrawImageProcessor methods
8 years ago
Vicente Penades
96d2f6ddcc
Split PixelBlendMode enumeration into PixelColorBlendingMode and PixelAlphaCompositionMode
8 years ago
Anton Firszov
61e2a8d92b
Replace Configuration.ParallelOptions with Configuration.MaxDegreeOfParallelism
8 years ago
Anton Firszov
9e856a23cc
Move ImageSharp-specific memory primitives and utils to SixLabors.ImageSharp.Memory
8 years ago
Anton Firszov
12bcdbb49a
replace IBuffer<T> with IMemoryOwner<T>
8 years ago
James Jackson-South
0a6913e0c6
Simplify drawing namespaces.
8 years ago
Anton Firszov
85d7548049
rename namespace: SixLabors.ImageSharp.Memory -> SixLabors.Memory
8 years ago
Anton Firszov
6585f9551f
RENAME: MemoryManager -> MemoryAllocator
8 years ago
Anton Firszov
e610fd0f7a
Change IBuffer<T>.Span to IBuffer<T>.GetSpan() to match System.Buffers.MemoryManager<T> API
8 years ago
James Jackson-South
6ec2a26982
Overlays => Drawing
8 years ago
James Jackson-South
563077d87d
Combine drawing methods to new Overlays namespace.
8 years ago
James Jackson-South
4573913520
Move drawing files into structured folders
8 years ago
James Jackson-South
8bda02579f
Refactor Image, ImageFrame + IImage
8 years ago
James Jackson-South
4bc09cf794
Quantizer
8 years ago
James Jackson-South
13fa40874e
Binarization, Convolution, DIthering, Effects & Filters
8 years ago
Anton Firszov
3f4cdf1685
build fix after merge
8 years ago
James Jackson-South
2fc6d4991e
Remove Size parameter and minor transform cleanup.
8 years ago
James Jackson-South
1157dbe5be
Remove Clone from DrawImage to reduce memory consumption
8 years ago
Anton Firszov
bcb9c0057a
passing MemoryManager to pixel blenders
8 years ago
Anton Firszov
caf1ad05a2
MemoryManager returns IBuffer<T> now
8 years ago
Anton Firszov
7881fdd341
Hide Buffer<T> indexer + !! WuQuantizer review in comments !!
8 years ago
Lauri Kotilainen
8d44ae346e
- Explicitly pass MemoryManager to the places that
need it (aside from a few exceptions)
8 years ago
Lauri Kotilainen
61b61709a9
- Allocate Buffers from memory manager
8 years ago
James Jackson-South
55d688387e
Correctly handle negative x location. Fix #252
8 years ago
James Jackson-South
403b7759df
Remove PixelAccessor and cleanup
8 years ago
Scott Williams
b289ce752a
pass configuation into processors
9 years ago
Scott Williams
74f05629b8
fix frame double processing
moved some extensions into new namespace
9 years ago
Scott Williams
ec2503c2e4
wip - pixel data only on image frames
9 years ago
James Jackson-South
5edcbb5b47
Remove ParallelOptions from IImageProcessor
9 years ago
Scott Williams
872ca973de
inital rename packages and namespaces
9 years ago
Scott Williams
612b5e2e50
Renameing classes + simplifying Image<TPixel>
9 years ago
Scott Williams
523e779c7c
Rename Generate -> Clone
9 years ago
Scott Williams
32c158898b
migrate to a Image.Generate/Image.Mutate context api
9 years ago
Scott Williams
7f8d10c89a
migrate to use primitives from SixLabors.Core
9 years ago
James Jackson-South
9984ffa348
Replace BufferSpan<T> with Span<T>
- Add System.Memory
- Update System.Runtime.CompilerServices.Unsafe
- Move memory classes/structs to ImageSharp.Memory
- Replace BufferSpan<T> with Span<T> and adjust methods accordingly
9 years ago
Scott Williams
acc0fa9711
blend functions everywhere.
9 years ago
Scott Williams
3f0cc9abf6
updates to comments and moved code
9 years ago
Scott Williams
f435a9d0ba
migrate blenders to PorterDuff
9 years ago
James Jackson-South
7d2fe2c7e5
Move IPixel types to PixelFormat namespace
9 years ago