File tree Expand file tree Collapse file tree
src/ImageSharp/Formats/Png Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments