Browse Source

Fix build errors

pull/1930/head
Brian Popow 4 years ago
parent
commit
6fdf643d55
  1. 10
      src/ImageSharp/Formats/Webp/AlphaDecoder.cs

10
src/ImageSharp/Formats/Webp/AlphaDecoder.cs

@ -321,7 +321,7 @@ namespace SixLabors.ImageSharp.Formats.Webp
}
nint i;
var last = Vector128<int>.Zero.WithElement(0, dst[0]);
Vector128<int> last = Vector128<int>.Zero.WithElement(0, dst[0]);
ref byte srcRef = ref MemoryMarshal.GetReference(input);
for (i = 1; i + 8 <= width; i += 8)
{
@ -341,7 +341,7 @@ namespace SixLabors.ImageSharp.Formats.Webp
for (; i < width; ++i)
{
dst[i] = (byte)(input[i] + dst[i - 1]);
dst[(int)i] = (byte)(input[(int)i] + dst[(int)i - 1]);
}
}
else
@ -360,7 +360,7 @@ namespace SixLabors.ImageSharp.Formats.Webp
private static void VerticalUnfilter(Span<byte> prev, Span<byte> input, Span<byte> dst, int width)
{
if (prev == null)
if (prev.IsEmpty)
{
HorizontalUnfilter(null, input, dst, width);
}
@ -382,7 +382,7 @@ namespace SixLabors.ImageSharp.Formats.Webp
for (; i < width; i++)
{
dst[i] = (byte)(prev[i] + input[i]);
dst[(int)i] = (byte)(prev[(int)i] + input[(int)i]);
}
}
else
@ -398,7 +398,7 @@ namespace SixLabors.ImageSharp.Formats.Webp
private static void GradientUnfilter(Span<byte> prev, Span<byte> input, Span<byte> dst, int width)
{
if (prev == null)
if (prev.IsEmpty)
{
HorizontalUnfilter(null, input, dst, width);
}

Loading…
Cancel
Save