|
|
|
@ -17,8 +17,7 @@ namespace ImageSharp.Formats |
|
|
|
/// </summary>
|
|
|
|
/// <param name="scanline">The scanline to decode</param>
|
|
|
|
/// <param name="previousScanline">The previous scanline.</param>
|
|
|
|
/// <returns>The <see cref="T:byte[]"/></returns>
|
|
|
|
public static byte[] Decode(byte[] scanline, byte[] previousScanline) |
|
|
|
public static void Decode(byte[] scanline, byte[] previousScanline) |
|
|
|
{ |
|
|
|
// Up(x) + Prior(x)
|
|
|
|
fixed (byte* scan = scanline) |
|
|
|
@ -31,8 +30,6 @@ namespace ImageSharp.Formats |
|
|
|
scan[x] = (byte)((scan[x] + above) % 256); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return scanline; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -42,7 +39,6 @@ namespace ImageSharp.Formats |
|
|
|
/// <param name="previousScanline">The previous scanline.</param>
|
|
|
|
/// <param name="result">The filtered scanline result.</param>
|
|
|
|
/// <param name="bytesPerScanline">The number of bytes per scanline</param>
|
|
|
|
/// <returns>The <see cref="T:byte[]"/></returns>
|
|
|
|
public static void Encode(byte[] scanline, byte[] previousScanline, byte[] result, int bytesPerScanline) |
|
|
|
{ |
|
|
|
// Up(x) = Raw(x) - Prior(x)
|
|
|
|
|