Browse Source

Fix renaming error

af/merge-core
James Jackson-South 9 years ago
parent
commit
c63941377d
  1. 3
      src/ImageSharp/Image/ImageBase{TPixel}.cs
  2. 3
      src/ImageSharp/Image/PixelAccessor{TPixel}.cs

3
src/ImageSharp/Image/ImageBase{TPixel}.cs

@ -167,6 +167,7 @@ namespace ImageSharp
int newHeight = pixelSource.Height;
// Push my memory into the accessor (which in turn unpins the old puffer ready for the images use)
TPixel[] newPixels = pixelSource.ReturnCurrentColorsAndReplaceThemInternally(this.Width, this.Height, this.pixelBuffer);
this.Width = newWidth;
this.Height = newHeight;
this.pixelBuffer = newPixels;
@ -240,4 +241,4 @@ namespace ImageSharp
Array.Clear(this.pixelBuffer, 0, this.Width * this.Height);
}
}
}
}

3
src/ImageSharp/Image/PixelAccessor{TPixel}.cs

@ -236,6 +236,7 @@ namespace ImageSharp
/// <param name="pixels">The pixels.</param>
/// <returns>Returns the old pixel data thats has gust been replaced.</returns>
/// <remarks>If <see cref="M:PixelAccessor.PooledMemory"/> is true then caller is responsible for ensuring <see cref="M:PixelDataPool.Return()"/> is called.</remarks>
internal TPixel[] ReturnCurrentColorsAndReplaceThemInternally(int width, int height, TPixel[] pixels)
{
TPixel[] oldPixels = this.pixelBuffer.TakeArrayOwnership();
this.SetPixelBufferUnsafe(width, height, pixels);
@ -538,4 +539,4 @@ namespace ImageSharp
}
}
}
}
}
Loading…
Cancel
Save