Browse Source

Fixed build warnings / errors

pull/2415/head
Günther Foidl 3 years ago
parent
commit
57d0793130
  1. 2
      src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
  2. 6
      src/ImageSharp/Formats/Webp/Lossy/WebpLossyDecoder.cs
  3. 2
      src/ImageSharp/Formats/Webp/WebpDecoderCore.cs

2
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs

@ -125,7 +125,7 @@ internal sealed class JpegDecoderCore : IRawJpegData, IImageDecoderInternals
}
/// <summary>
/// The only supported precision
/// Gets the only supported precisions
/// </summary>
// Refers to assembly's static data segment, no allocation occurs.
private static ReadOnlySpan<byte> SupportedPrecisions => new byte[] { 8, 12 };

6
src/ImageSharp/Formats/Webp/Lossy/WebpLossyDecoder.cs

@ -361,6 +361,9 @@ internal sealed class WebpLossyDecoder
}
}
Span<int> scratch = stackalloc int[16];
Span<byte> scratchBytes = stackalloc byte[4];
// Reconstruct one row.
for (int mbx = 0; mbx < dec.MbWidth; mbx++)
{
@ -399,9 +402,6 @@ internal sealed class WebpLossyDecoder
topYuv.V.CopyTo(yuv[(vOff - WebpConstants.Bps)..]);
}
Span<int> scratch = stackalloc int[16];
Span<byte> scratchBytes = stackalloc byte[4];
// Predict and add residuals.
if (block.IsI4x4)
{

2
src/ImageSharp/Formats/Webp/WebpDecoderCore.cs

@ -228,7 +228,7 @@ internal sealed class WebpDecoderCore : IImageDecoderInternals, IDisposable
/// <param name="chunkType">The chunk type.</param>
/// <param name="features">The webp image features.</param>
/// <param name="ignoreAlpha">For identify, the alpha data should not be read.</param>
/// <param name="buffer">Temporary buffer.</param></param>
/// <param name="buffer">Temporary buffer.</param>
/// <returns>true, if its a alpha chunk.</returns>
private bool ParseOptionalExtendedChunks(
BufferedReadStream stream,

Loading…
Cancel
Save