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
Sven Claesson
c795d81404
Fix integer overflow and bounds-checking vulnerabilities in EXR decoder ( #3126 )
* Fix integer overflow and bounds-checking vulnerabilities in EXR decoder
Use ulong arithmetic in CalculateBytesPerRow and block size calculations
to prevent integer overflow. Add validation for DataWindow dimensions,
block size limits, and row offsets outside stream bounds.
* Harden EXR row offset validation
* EXR: validate sizes, prevent overflows, dispose image
---------
Co-authored-by: James Jackson-South <james_south@hotmail.com>
2 months ago
James Jackson-South
1e65e08fc1
Add additional unit tests to improve code coverage. Update licensing version
2 months ago
James Jackson-South
37f534ea5d
Add ImageFrame visitor; use Buffer2D Size/Bounds + expose subregion extensions
3 months ago
Brian Popow
7d38e50d3f
Use better test image for float pixel type created with reference encoder
3 months ago
Brian Popow
e8c9d6db9d
Add test case for pxr compression with pixel type uint
3 months ago
Brian Popow
efa1f8bbae
Add test case for pxr compression with pixel type float
3 months ago
Brian Popow
d805b9b50c
Add test case for pxr24 compressed image
3 months ago
James Jackson-South
66671a0e9f
Implement proper segment integrity handling & tolerant parsing
3 months ago
James Jackson-South
3b1b8956cf
Stop parsing after SOS in JPEG decoder in ProcessStartOfFrameMarker
3 months ago
James Jackson-South
cde366b5cd
Remove premature rounding during normalization
3 months ago
James Jackson-South
dd395e1c03
Enhance metadata conversion
3 months ago
Brian Popow
d98ffac34c
Add test for setting pixel type for encoding exr images
3 months ago
Brian Popow
29f558a801
Add test case for uint pixel type with alpha
3 months ago
James Jackson-South
f0ce591a64
Rename quantizer and update tests
3 months ago
James Jackson-South
90f0c0b5d4
Update and simplify quantization color caches.
3 months ago
Andreas
9569449ac4
Fix MaxFrames handling in PNG decoder
- Change >= to > for correct MaxFrames boundary
- Skip fdAT chunk data when hitting maxFrames in Identify to maintain stream alignment
- Add tests for Identify and Load with MaxFrames
3 months ago
Andreas
a76c02f7c0
Replace test image with a smaller one.
Adjusted Identify_AnimatedPng_ReadsFrameCountCorrectly to expect 48 frames instead of 50.
3 months ago
Andreas Eriksson
7b13e1df1b
Add generated animated PNG tests for Identify and Decode frame counts
4 months ago
Andreas Eriksson
ac1905328d
Fix Identify returning incorrect frame count for animated PNGs
The Identify method had two bugs when processing fdAT (FrameData) chunks:
1. A spurious Skip(4) before SkipChunkDataAndCrc caused the stream to
be misaligned by 4 bytes, since chunk.Length already includes the
4-byte sequence number.
2. Unlike Decode, which consumes all fdAT chunks for a frame in one shot
via ReadScanlines + ReadNextFrameDataChunk, Identify processed them
individually, calling InitializeFrameMetadata for each chunk and
inflating the frame count.
The fix removes the extra Skip(4) and adds SkipRemainingFrameDataChunks
to consume all continuation fdAT chunks for a frame, mirroring how
ReadNextFrameDataChunk works during decoding.
4 months ago
Brian Popow
802e275e8e
Use CompareToReferenceOutput for failing bmp tests on linux
4 months ago
Brian Popow
0c3ca3da24
Fix failing bmp tests
4 months ago
Brian Popow
a9f6dbc68b
Add compression to exr metadata
4 months ago
Brian Popow
b95663489e
Add tests for exr metadata
4 months ago
Brian Popow
c8c3656aaf
Implement GetPixelTypeInfo() for EXR
4 months ago
Brian Popow
8c0c85442c
Set exr pixel type when decoding an image
4 months ago
Brian Popow
a741e84a12
Use exact comparer as default for exr decoder tests
4 months ago
Brian Popow
53230af86b
Use tolerant comparer for B44 compression
4 months ago
Brian Popow
aa0af92faa
Use CompareToReferenceOutput for int pixel type
4 months ago
Brian Popow
d409a3b7d3
Use magick Reference decoder
4 months ago
Brian Popow
a3349efb34
Add ExrEncoder tests
4 months ago
Brian Popow
4e81c02b5d
Add test case for Issue #3093
4 months ago
Brian Popow
fc40209727
Test case for pixel type uint
4 months ago
Brian Popow
1abfe6966d
Add test image for decoding exr with float piyel type
4 months ago
Brian Popow
e4c22d8f67
Add tests for decode RGB and gray exr files
4 months ago
Brian Popow
d121039956
Add test for Identify
4 months ago
Brian Popow
faf87fbe16
Use MagickReference decoder for exr decoding tests
4 months ago
Brian Popow
b78402d524
Fix issue in ExrImageFormatDetector.cs returning wrong format
4 months ago
Brian Popow
83dba5872b
Change exr name space to SixLabors.ImageSharp.Formats.Exr
4 months ago
Brian Popow
fa52ab740f
Adjust exr decoder / encoder to ImageSharp changes
4 months ago
Brian Popow
c512b142f9
If alpha length is greater then colorTable, slice length to colorTable length
4 months ago
Brian Popow
9c9b6124f3
Add test case for alpha.Length > colorTable.Length
4 months ago
Brian Popow
8d78fe0b08
Add test case for truncated data after language tag
4 months ago
Brian Popow
457436d970
Add test case for not enough data reading InternationalText chunk
4 months ago
Brian Popow
eab4147235
Add test case for not enough data after keyword end
4 months ago
Brian Popow
60c556cd2a
Remove not used using, change ImageFormatException to InvalidImageContentException
4 months ago
Brian Popow
93b9345ab8
Add test case for #3078
4 months ago
Brian Popow
7d608dd087
Add test case for issue #3074
4 months ago
James Jackson-South
ae6bdbf36f
JPEG - Throw explicit ImageContentException on missing marker.
4 months ago
James Jackson-South
ae9ca4c5bf
Fix #3064
R
4 months ago