Stefan Nikolei
67a94113e4
Migrate tests from xUnit v2 to xUnit.v3 3.2.2
Breaking changes addressed:
- Update xunit.v3 to 3.2.2 and xunit.runner.visualstudio to 3.1.5
- Remove Microsoft.DotNet.XUnitExtensions (conflicts with xunit.v3 via xunit.core v2)
- Replace ConditionalFact/ConditionalTheory with Fact/Theory SkipUnless/SkipWhen/SkipType
- Remove 'using Xunit.Abstractions' (ITestOutputHelper now in Xunit namespace globally)
- Fix TestFrameworkAttribute: string args → typeof(T) form
- Fix XunitTestFramework ctor: no longer takes IMessageSink
- Fix BeforeAfterTestAttribute Before/After: added IXunitTest parameter, use Xunit.v3 ns
- Fix DataAttribute: new GetData signature (DisposalTracker), add SupportsDiscoveryEnumeration()
- Fix IXunitSerializable/IXunitSerializationInfo: add 'using Xunit.Sdk' to all consumers
- Fix BasicSerializer: implement new IXunitSerializationInfo.GetValue(string) returning object?
Store type info in dump format (key:TypeAQN:value) to enable typed reconstruction
- Fix TheoryData<T> CS0121 ambiguity on C# 12/net8.0: add explicit casts (T)value
Affects ExifValuesTests, PixelOperationsTests, QuantizerTests, DitherTests,
TestImageProviderTests, RotateTests, L8Tests, La16Tests
- Fix PngEncoderTests: TheoryData<T> now yields TheoryDataRow<T>, not object[]
2 months ago
James Jackson-South
f96d28714d
Update ColorNumericsTests.cs
3 months ago
James Jackson-South
656f53d052
Remove not-needed validate method and tests
3 months ago
James Jackson-South
ad58e74505
Allow -1 (unbounded) parallelism; validate settings
3 months ago
Stefan Nikolei
18b8b662e9
Use Target Type new only when apparent
1 year ago
Stefan Nikolei
57f5966fe7
use Explicit Types and Target Type new
1 year ago
James Jackson-South
ed3860cfda
Handle EOF in Jpeg bit reader when data is bad to prevent DOS attack. ( #2516 )
* Handle EOF in bit reader when data is bad.
* Allow parallel processing of multi-megapixel image
* Stream seek can exceed the length of a stream
* Try triggering on release branches
* Update JpegBitReader.cs
* Skin on Win .NET 6
* All Win OS is an issue
* Address feedback
* add validation to CanIterateWithoutIntOverflow
---------
Co-authored-by: antonfirsov <antonfir@gmail.com>
3 years ago
Ynse Hoornenborg
d42d8df88d
Introduce GetRequiredBufferLength method
4 years ago
James Jackson-South
0e9a066195
FS Namespaces and Implicit Global Usings
4 years ago
Dirk Lemstra
3a6f26d136
Removed unused class.
4 years ago
James Jackson-South
6fc84a82f6
Remove other obsolete conditions and warnings
4 years ago
James Jackson-South
97baeaf438
Update all files
4 years ago
Mike Irving
7be52e1325
naming corrections - macOS and .NET
4 years ago
James Jackson-South
27e6b58643
Final final warnings
5 years ago
Anton Firszov
7c1a1afc61
UniformUnmanagedMemoryPoolMemoryAllocator
5 years ago
James Jackson-South
0791b576bd
Rename methods to use Dangerous prefix.
5 years ago
James Jackson-South
dc0982f186
Faster Linear Transforms ( #1591 )
* Attempt to use same weight generation algorithm as resize.
* tests pass
* Identical output
* Update LinearTransformKernelFactory{TResampler}.cs
* Use new low allocation iterator
* Migrate projective transforms.
* Optimizations
* Smaller kernel
* Fix sampling accuracy
* Finalize and update refs
* Revert unnecessary changes
* Remove enumerator
* Actually save output for debugging.
* Use custom test png encoder for reduced memory environments
* Convolution should use scaled vectors
* Update TestEnvironmentTests.cs
* Try using doubles
* Moar double precision
* Fix radius calculation
* Test if issue is SIMD related.
* Detect runtime to determine pipeline.
* Fix stack overflow
* fix condition
* Try simplified scalar run
* Simplify unpremultiply scalar
* Update Numerics.cs
* Fix runtime environment
* Update ImageSharp.csproj
* Duplicate the caller with scalar versions
* Update method name, exclude from coverage.
* Don't save output during coverage tests for perf.
* Update src/ImageSharp/Common/Helpers/RuntimeEnvironment.cs
Co-authored-by: Anton Firszov <antonfir@gmail.com>
Co-authored-by: Anton Firszov <antonfir@gmail.com>
5 years ago
James Jackson-South
8d3cddab30
No more Vector4Utils & ImageMath
6 years ago
James Jackson-South
f66fe45ac1
Utils FTW
6 years ago
James Jackson-South
124a54c5ad
ImageMaths => ImageMath
6 years ago
James Jackson-South
e9f734a943
Introduce Numerics and migrate ImageMaths methods
6 years ago
James Jackson-South
aecf80388c
Add Avx2 Span Premultiplication and Reverse
6 years ago
James Jackson-South
874115bd0a
Update license
6 years ago
James Jackson-South
6183dd8c13
Update source license info.
6 years ago
James Jackson-South
f2aa2a7965
Replace Vector4.Clamp
6 years ago
Sergio Pedri
8fb9c466d8
Renamed ParallelRowIterator.IterateRows to IterateRowIntervals
6 years ago
Anton Firszov
cf4d5a7457
fix JpegDecoder
7 years ago
James Jackson-South
f11a3a019b
Use Span<T> as buffer param
7 years ago
James Jackson-South
33bd5a920c
Fix arguments order and tests
7 years ago
James Jackson-South
00dc2a8c98
Internalize, partially optimize and rename Action methods.
7 years ago
James Jackson-South
b62434cea9
Rename class and add native memory profiler
7 years ago
Anton Firszov
11183d0a94
a few more cases to ParallelHelperTests
7 years ago
James Jackson-South
8e12faddf3
Break when minY >= bottom
7 years ago
Anton Firszov
35796da28c
Improve robustness of discontiguous Buffer2D
7 years ago
James Jackson-South
8cd722cfc5
Revert `using` declaration changes for until we establish guidelines.
7 years ago
Brian Popow
f60bc937de
Use using declarations to reduce nesting
7 years ago
Brian Popow
7b052c8076
Fix stylecop warnings in the test project
7 years ago
James Jackson-South
c24b364be1
Merge namespaces
7 years ago
Brian Popow
50bacca782
Add GetBT709Luminance with vector test
7 years ago
Anton Firszov
53bb11a236
expose ParallelExecutionSettings and ParallelHelper, fix MaxDegreeOfParallelism
7 years ago
Anton Firszov
d758d49f1f
expose limited Buffer2D internals, smplify API surface
7 years ago
Anton Firszov
895d51559a
delete GuardTests
7 years ago
Anton Firszov
cca018dd0c
delete GuardTests
7 years ago
Simon Cropp
bcbd4726a6
use var where apparent ( #972 )
* use var where apparent
* use var where apparent
* should use Rgb24
7 years ago
Simon Cropp
270a073fc6
Cleanup ( #965 )
* redundant ()
* redundant stirng interpolation
* use method groups
* redundant unsafe
* redundant qualifiers
* redundant ()
* redundant init
* redundant init
* redundant casts
* redundant casts
7 years ago
Simon Cropp
2c04d6b036
redundant usings ( #960 )
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
398736a09b
moar RowInterval stuff
7 years ago
James Jackson-South
bbb739ba93
Fix Color Filters ( #806 )
* Use Matrix5x4 and fix Hue Filter
* Update test references. Fix #802
* Increase tolerance to handle xplat variance.
* Rename to ColorMatrix
8 years ago
Anton Firszov
a5c5f618b3
TolerantMath: implemented Floor and Ceiling
8 years ago