File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/ImageSharp/Formats/Png Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -654,7 +654,8 @@ private void InitializeFrame<TPixel>(
654
654
{
655
655
frame = image . Frames . AddFrame ( previousFrame ?? image . Frames . RootFrame ) ;
656
656
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).
658
659
if ( previousFrameControl == null || ( previousFrame is null && previousFrameControl . Value . DisposeOperation == PngDisposalMethod . RestoreToPrevious ) )
659
660
{
660
661
Buffer2DRegion < TPixel > pixelRegion = frame . PixelBuffer . GetRegion ( ) ;
You can’t perform that action at this time.
0 commit comments