Browse Source
Merge branch 'master' into js/fix-1191
pull/1945/head
James Jackson-South
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
17 additions and
1 deletions
-
src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeWorker.cs
-
tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs
-
tests/Images/External/ReferenceOutput/ResizeTests/Issue1625_LimitedAllocator.png
|
|
|
@ -88,7 +88,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms |
|
|
|
this.transposedFirstPassBuffer = configuration.MemoryAllocator.Allocate2D<Vector4>( |
|
|
|
this.workerHeight, |
|
|
|
destWidth, |
|
|
|
AllocationOptions.Clean); |
|
|
|
preferContiguosImageBuffers: true, |
|
|
|
options: AllocationOptions.Clean); |
|
|
|
|
|
|
|
this.tempRowBuffer = configuration.MemoryAllocator.Allocate<Vector4>(this.sourceRectangle.Width); |
|
|
|
this.tempColumnBuffer = configuration.MemoryAllocator.Allocate<Vector4>(destWidth); |
|
|
|
|
|
|
|
@ -669,5 +669,17 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms |
|
|
|
Assert.Equal(height, image.Height); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[WithBasicTestPatternImages(20, 20, PixelTypes.Rgba32)] |
|
|
|
public void Issue1625_LimitedAllocator<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
|
{ |
|
|
|
provider.LimitAllocatorBufferCapacity().InBytes(1000); |
|
|
|
provider.RunValidatingProcessorTest( |
|
|
|
x => x.Resize(30, 30), |
|
|
|
appendPixelTypeToFileName: false, |
|
|
|
appendSourceFileOrDescription: false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,3 @@ |
|
|
|
version https://git-lfs.github.com/spec/v1 |
|
|
|
oid sha256:bedaced9c302ff735319f189d867b6a722ed4eade63152b67cf07881f8b3964d |
|
|
|
size 289 |