James Jackson-South
4b07920c7c
Fix alpha association and SIMD rounding parity
Refactors `Color` to track both exposed and stored alpha representations, adds `ToScaledVector4(PixelAlphaRepresentation)`, and adjusts pixel conversion paths so associated formats preserve canonical values without unnecessary unpremultiply/reassociate loss. This also updates equality/hash behavior to compare canonical scaled values.
SIMD helpers are split into `MultiplyAddEstimate` vs `FusedMultiplyAdd`, with byte-to-float normalization updated to match scalar rounding exactly across vector widths. JPEG converters, resize kernels, and Porter-Duff/associated-alpha blending paths were updated to use the appropriate helper for either fast estimate or strict fused rounding semantics. Tests were expanded substantially (including exhaustive component/alpha cases and fused-order checks), incidental test cleanup was applied, benchmark comment snapshots were refreshed, and one black/white reference output image was updated.
2 months ago
James Jackson-South
c4683902a4
Add associated-alpha pixel formats
Introduce Rgba32P, Bgra32P, Argb32P, Abgr32P, NormalizedByte4P, and HalfVector4P.
Add representation-aware scalar and bulk conversions, optimized pixel operations, and associated-alpha blending across all Porter-Duff modes. Include comprehensive conversion, layout, blending, and performance coverage.
2 months ago
James Jackson-South
5a0a74fecc
Merge pull request #3152 from SixLabors/js/fix-convolution-small-bounds
Fix convolution sampling for bounds smaller than the kernel radius
2 months ago
James Jackson-South
0b685ab034
Fix convolution sampling for bounds smaller than the kernel radius
KernelSamplingMap.CorrectBorder sliced the offset span by
radius * kernelSize, so bounds narrower than the kernel radius threw
ArgumentOutOfRangeException (GaussianBlur of a 130x8 region with
sigma 10, for example), and bounds exactly equal to the radius let
Bounce offsets escape the sampling range by folding an overshoot of a
full extent to min - 1.
Route bounds no larger than the radius through an exact per-mode
correction that folds each offset into range: clamp for Repeat,
periodic reflection for Mirror and Bounce, and true modulo for Wrap.
The single-pass corrections are unchanged for larger bounds.
2 months ago
James Jackson-South
cef0402233
Merge branch 'main' into png-cgbi-improvements
2 months ago
James Jackson-South
ed6c2ddabf
Merge pull request #3149 from SixLabors/dependabot/github_actions/actions/cache-6
Bump actions/cache from 5 to 6
2 months ago
James Jackson-South
df8634eed1
Merge pull request #3146 from SixLabors/dependabot/github_actions/actions/checkout-7
Bump actions/checkout from 6 to 7
2 months ago
James Jackson-South
67aa0d341c
Merge pull request #3150 from SixLabors/js/porter-duff-coverage
Add BlendWithCoverage overloads. Optimize Rgba32 compatible shuffling.
2 months ago
James Jackson-South
74ecde6667
Merge branch 'main' into js/porter-duff-coverage
2 months ago
James Jackson-South
eb4bfc95ea
Add BlendWithCoverage overloads. Optimize Rgba32 compatible shuffling.
2 months ago
dependabot[bot]
39d5eec886
Bump actions/cache from 5 to 6
Bumps [actions/cache](https://github.com/actions/cache ) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](https://github.com/actions/cache/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
dependabot[bot]
13f417e40f
Bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout ) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v6...v7 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '7'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
James Jackson-South
fd464a4725
Revise SECURITY.md for clarity on security policies
Updated the security policy to clarify supported versions, reporting vulnerabilities, and scope of responsibility.
3 months ago
Erik White
e136830476
Merge branch 'png-cgbi-improvements' of https://github.com/Erik-White/ImageSharp into png-cgbi-improvements
3 months ago
Erik White
5472d6918a
Use FeatureTestRunner for all instruction sets
3 months ago
Erik White
fb207199f5
Clean up/clarify test helper method
3 months ago
James Jackson-South
9c41e9c12e
Merge pull request #3141 from SixLabors/dependabot/github_actions/codecov/codecov-action-7
Bump codecov/codecov-action from 6 to 7
3 months ago
James Jackson-South
4869c344b3
Merge branch 'main' into png-cgbi-improvements
3 months ago
James Jackson-South
1e85a10647
Merge branch 'main' into dependabot/github_actions/codecov/codecov-action-7
3 months ago
James Jackson-South
58873574c6
Merge pull request #3143 from SixLabors/js/fix-3142
Fix GIF transparency handling and dither
3 months ago
James Jackson-South
e5ca2782e6
Fix GIF transparency handling and dither
3 months ago
dependabot[bot]
3d50834193
Bump codecov/codecov-action from 6 to 7
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 6 to 7.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v6...v7 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-version: '7'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
Erik White
47678c748d
Use single buffer for shuffle bytes
4 months ago
Erik White
3b37d5552d
Remove redundant floor. Float to int conversion will already truncate toward zero
4 months ago
Erik White
49dc1951db
Fix read stream byte read semantics
4 months ago
Erik White
e6f09d6616
Use constant or static values where possible
4 months ago
Erik White
9dfc0ca044
Remove unnecessary instruction set check
4 months ago
Erik White
a68921cac3
Break out cgbi helper methods
4 months ago
Erik White
fdc15d283e
Separate Zlib header validation fom stream reading
4 months ago
Erik White
29ae5f8409
Guard CgBI bit depth and color type
4 months ago
James Jackson-South
04ff1e91de
Merge pull request #3136 from Erik-White/png-cgbi
Add support for Apple CgBI PNG images
4 months ago
James Jackson-South
a3e9cc6fd4
Fix in-place shuffles and vectorize PNG CgBI transform
4 months ago
Erik White
4f27f4fc38
Merge branch 'png-cgbi' of https://github.com/Erik-White/ImageSharp into png-cgbi
4 months ago
Erik White
5d206ec10f
Add test data for RGB24
4 months ago
James Jackson-South
e4e0613bee
Merge branch 'main' into png-cgbi
4 months ago
Erik White
70a49b1d9d
Add tests for Identify
4 months ago
Erik White
4f85600cb8
Improve ApplyCgbiTransform
4 months ago
Erik White
3e843a06a2
Implement CgBI support
4 months ago
James Jackson-South
f6d369d86a
Merge pull request #3134 from SixLabors/js/fix-pbm-dcoder
Validate PBM max pixel value
4 months ago
James Jackson-South
8e6cab957b
Validate PBM max pixel value
4 months ago
James Jackson-South
8f2716b567
GIF: background handling & quantizer overflow fix ( #3133 )
* GIF: background handling & quantizer overflow fix
* Fix tests
4 months ago
James Jackson-South
ff36e83c74
Add AllocationTrackedMemoryManager and refactor allocators ( #3120 )
* Add AllocationTrackedMemoryManager and refactor allocators
* Add AllocationTrackingState and refactor tracking
* Cleanup
* Address feedback
* Introduce ApplyOptions and use in allocators
* Propagate allocation tracking to lifetime guards
* Address Copilot feedback
* Fix multi-buffer group tracking and enforce limits
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix override accesibility
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
4 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>
4 months ago
James Jackson-South
ae72ea08b6
Merge pull request #3127 from SixLabors/js/coverage
Add additional unit tests to improve code coverage. Update licensing
4 months ago
James Jackson-South
1e65e08fc1
Add additional unit tests to improve code coverage. Update licensing version
4 months ago
James Jackson-South
2b1c7e0cf1
Merge pull request #3121 from SixLabors/dependabot/github_actions/NuGet/setup-nuget-4
Bump NuGet/setup-nuget from 2 to 4
4 months ago
James Jackson-South
6ec54552f0
Merge pull request #3097 from SixLabors/dependabot/github_actions/codecov/codecov-action-6
Bump codecov/codecov-action from 5 to 6
4 months ago
James Jackson-South
a7b9258349
Merge branch 'main' into dependabot/github_actions/NuGet/setup-nuget-4
5 months ago
James Jackson-South
936a65bdbf
Merge pull request #3124 from SixLabors/bp/decodePxr24
Add support for decoding PXR24 compressed Exr images
5 months ago
Brian Popow
1d99ec24c3
Merge branch 'main' into bp/decodePxr24
5 months ago