|
|
|
@ -44,11 +44,9 @@ namespace ImageSharp.Formats |
|
|
|
/// <param name="bytesPerPixel">The bytes per pixel.</param>
|
|
|
|
/// <param name="bytesPerScanline">The number of bytes per scanline</param>
|
|
|
|
/// <returns>The <see cref="T:byte[]"/></returns>
|
|
|
|
public static byte[] Encode(byte[] scanline, int bytesPerPixel, int bytesPerScanline) |
|
|
|
public static byte[] Encode(byte[] scanline, byte[] result, int bytesPerPixel, int bytesPerScanline) |
|
|
|
{ |
|
|
|
// Sub(x) = Raw(x) - Raw(x-bpp)
|
|
|
|
byte[] result = new byte[bytesPerScanline + 1]; |
|
|
|
|
|
|
|
fixed (byte* scan = scanline) |
|
|
|
fixed (byte* res = result) |
|
|
|
{ |
|
|
|
|