Anton Firszov
7c45f467d5
expose ParallelExecutionSettings and ParallelHelper, fix MaxDegreeOfParallelism
6 years ago
James Jackson-South
1796862302
Make processors public, refactor cloning.
6 years ago
Sergio Pedri
13989ac126
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
Anton Firszov
b7dadca8b0
clean-up drawing processors
7 years ago
Anton Firszov
0bd86ddcb6
non-generic DrawImageProcessor
7 years ago
Anthony Truskinger
ff269db0bd
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
ca60ecf7f4
pass Configuration to Vector4 converters in PixelOperations
7 years ago
Anton Firszov
0c42925a05
fix typo, improve DivideCeil
7 years ago
Anton Firszov
f0cda4387b
DrawImageProcessor + formatting
7 years ago
Vicente Penades
112262a606
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
1035f23908
rearranged DrawImage method arguments. Fixed tests accordingly
8 years ago
Vicente Penades
c3a325b685
refactored DrawImageProcessor methods
8 years ago
Vicente Penades
b189ff7746
Split PixelBlendMode enumeration into PixelColorBlendingMode and PixelAlphaCompositionMode
8 years ago
Anton Firszov
b0c2ccb26f
Replace Configuration.ParallelOptions with Configuration.MaxDegreeOfParallelism
8 years ago
Anton Firszov
968a9cb186
Move ImageSharp-specific memory primitives and utils to SixLabors.ImageSharp.Memory
8 years ago
Anton Firszov
80a7b9f14a
replace IBuffer<T> with IMemoryOwner<T>
8 years ago
James Jackson-South
d6944d5a6a
Simplify drawing namespaces.
8 years ago
Anton Firszov
e417ea275e
rename namespace: SixLabors.ImageSharp.Memory -> SixLabors.Memory
8 years ago
Anton Firszov
86e6f863ea
RENAME: MemoryManager -> MemoryAllocator
8 years ago
Anton Firszov
aaba1a1885
Change IBuffer<T>.Span to IBuffer<T>.GetSpan() to match System.Buffers.MemoryManager<T> API
8 years ago
James Jackson-South
e7526f5057
Overlays => Drawing
8 years ago
James Jackson-South
fb666df341
Combine drawing methods to new Overlays namespace.
8 years ago
James Jackson-South
e1c258d3bf
Move drawing files into structured folders
8 years ago
James Jackson-South
6101a14b94
Refactor Image, ImageFrame + IImage
8 years ago
James Jackson-South
84a5a8e5d1
Quantizer
8 years ago
James Jackson-South
b7df3c1090
Binarization, Convolution, DIthering, Effects & Filters
8 years ago
Anton Firszov
110e3c7a76
build fix after merge
8 years ago
James Jackson-South
9fdf7e3720
Remove Size parameter and minor transform cleanup.
8 years ago
James Jackson-South
083a324981
Remove Clone from DrawImage to reduce memory consumption
8 years ago
Anton Firszov
a85cc516c3
passing MemoryManager to pixel blenders
8 years ago
Anton Firszov
77e524d83b
MemoryManager returns IBuffer<T> now
8 years ago
Anton Firszov
7db4cdc190
Hide Buffer<T> indexer + !! WuQuantizer review in comments !!
8 years ago
Lauri Kotilainen
f675f5c95a
- Explicitly pass MemoryManager to the places that
need it (aside from a few exceptions)
8 years ago
Lauri Kotilainen
607e452e2d
- Allocate Buffers from memory manager
8 years ago
James Jackson-South
1230967172
Correctly handle negative x location. Fix #252
8 years ago
James Jackson-South
fdd68c7ea4
Remove PixelAccessor and cleanup
8 years ago
Scott Williams
09a667d3a5
pass configuation into processors
9 years ago
Scott Williams
d8a8211417
fix frame double processing
moved some extensions into new namespace
9 years ago
Scott Williams
07e9f23dec
wip - pixel data only on image frames
9 years ago
James Jackson-South
1975c11dd6
Remove ParallelOptions from IImageProcessor
9 years ago
Scott Williams
94c60cb338
inital rename packages and namespaces
9 years ago
Scott Williams
ab30013d63
Renameing classes + simplifying Image<TPixel>
9 years ago
Scott Williams
a61fcc95d9
Rename Generate -> Clone
9 years ago
Scott Williams
f026778e47
migrate to a Image.Generate/Image.Mutate context api
9 years ago
Scott Williams
64f18bc298
migrate to use primitives from SixLabors.Core
9 years ago
James Jackson-South
b980703b02
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
3671d9b906
blend functions everywhere.
9 years ago
Scott Williams
d56e658854
updates to comments and moved code
9 years ago
Scott Williams
ad1bb5dbee
migrate blenders to PorterDuff
9 years ago
James Jackson-South
3e5c8f7b5d
Move IPixel types to PixelFormat namespace
9 years ago