Skip to content

Commit 4698e8c

Browse files
committed
re-add comment
1 parent ceb7dc0 commit 4698e8c

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
@@ -648,7 +648,8 @@ private void InitializeFrame<TPixel>(
648648
{
649649
frame = image.Frames.AddFrame(previousFrame ?? image.Frames.RootFrame);
650650

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

0 commit comments

Comments
 (0)