Skip to content

Commit

Permalink
fix undefined last row in planar WebP encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
saucecontrol committed Apr 27, 2023
1 parent 0c74f39 commit 49a40c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NativeCodecs/Libwebp/WebpEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void WriteFrame(IPixelSource source, IMetadataSource metadata, Rectangle
srcV.CopyPixels(areaUV.Slice(lastc, incc), picture.uv_stride, spanV.Slice(lastc * picture.uv_stride));
}

if (lasty < area.Height - 1)
if (lasty < area.Height)
{
srcY.CopyPixels(area.Slice(lasty), picture.y_stride, spanY.Slice(lasty * picture.y_stride));
srcU.CopyPixels(areaUV.Slice(lastc), picture.uv_stride, spanU.Slice(lastc * picture.uv_stride));
Expand Down

0 comments on commit 49a40c0

Please sign in to comment.