Skip to content

Commit 5cd96d3

Browse files
committed
re-add comment
1 parent a07c448 commit 5cd96d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ImageSharp/Formats/Png/PngDecoderCore.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,8 @@ private void InitializeFrame<TPixel>(
654654
{
655655
frame = image.Frames.AddFrame(previousFrame ?? image.Frames.RootFrame);
656656

657-
// If restoring to before first frame, restore to background. Same if first frame (previousFrameControl null).
657+
// If the first `fcTL` chunk uses a `dispose_op` of APNG_DISPOSE_OP_PREVIOUS it should be treated as APNG_DISPOSE_OP_BACKGROUND.
658+
// So, if restoring to before first frame, clear entire area. Same if first frame (previousFrameControl null).
658659
if (previousFrameControl == null || (previousFrame is null && previousFrameControl.Value.DisposeOperation == PngDisposalMethod.RestoreToPrevious))
659660
{
660661
Buffer2DRegion<TPixel> pixelRegion = frame.PixelBuffer.GetRegion();

0 commit comments

Comments
 (0)