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 @@ -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 ( ) ;
You can’t perform that action at this time.
0 commit comments