Browse Source

Fix git merge

pull/656/head
James Jackson-South 8 years ago
parent
commit
dfbf5536ae
  1. 2
      src/ImageSharp/Memory/AllocationOptions.cs
  2. 4
      src/ImageSharp/Processing/Processors/Normalization/HistogramEqualizationProcessor.cs

2
src/ImageSharp/Memory/AllocationOptions.cs

@ -14,7 +14,7 @@ namespace SixLabors.Memory
None,
/// <summary>
/// Indicates that the allocated buffer should be cleaned.
/// Indicates that the allocated buffer should be cleaned following allocation.
/// </summary>
Clean
}

4
src/ImageSharp/Processing/Processors/Normalization/HistogramEqualizationProcessor.cs

@ -43,8 +43,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
Span<TPixel> pixels = source.GetPixelSpan();
// Build the histogram of the grayscale levels.
using (IBuffer<int> histogramBuffer = memoryAllocator.AllocateClean<int>(this.LuminanceLevels))
using (IBuffer<int> cdfBuffer = memoryAllocator.AllocateClean<int>(this.LuminanceLevels))
using (IBuffer<int> histogramBuffer = memoryAllocator.Allocate<int>(this.LuminanceLevels, AllocationOptions.Clean))
using (IBuffer<int> cdfBuffer = memoryAllocator.Allocate<int>(this.LuminanceLevels, AllocationOptions.Clean))
{
Span<int> histogram = histogramBuffer.GetSpan();
for (int i = 0; i < pixels.Length; i++)

Loading…
Cancel
Save