Browse Source

Fix build

af/merge-core
Jason Nelson 8 years ago
parent
commit
8642a9cd73
  1. 2
      src/ImageSharp/Formats/Png/PngDecoderCore.cs
  2. 2
      src/ImageSharp/Formats/Png/PngEncoderCore.cs

2
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -1261,7 +1261,7 @@ namespace SixLabors.ImageSharp.Formats.Png
this.crc.Reset(); this.crc.Reset();
this.crc.Update(this.chunkTypeBuffer); this.crc.Update(this.chunkTypeBuffer);
this.crc.Update(chunk.Data.Array, 0, chunk.Length); this.crc.Update(new ReadOnlySpan<byte>(chunk.Data.Array, 0, chunk.Length));
if (this.crc.Value != chunk.Crc && IsCriticalChunk(chunk)) if (this.crc.Value != chunk.Crc && IsCriticalChunk(chunk))
{ {

2
src/ImageSharp/Formats/Png/PngEncoderCore.cs

@ -659,7 +659,7 @@ namespace SixLabors.ImageSharp.Formats.Png
BinaryPrimitives.WriteUInt32BigEndian(this.intBuffer, (uint)this.crc.Value); BinaryPrimitives.WriteUInt32BigEndian(this.intBuffer, (uint)this.crc.Value);
stream.Write(intBuffer, 0, 4); // write the crc stream.Write(this.intBuffer, 0, 4); // write the crc
} }
} }
} }
Loading…
Cancel
Save