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 @@ -648,7 +648,8 @@ private void InitializeFrame<TPixel>(
648
648
{
649
649
frame = image . Frames . AddFrame ( previousFrame ?? image . Frames . RootFrame ) ;
650
650
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).
652
653
if ( previousFrameControl == null || ( previousFrame is null && previousFrameControl . Value . DisposeOperation == PngDisposalMethod . RestoreToPrevious ) )
653
654
{
654
655
Buffer2DRegion < TPixel > pixelRegion = frame . PixelBuffer . GetRegion ( ) ;
You can’t perform that action at this time.
0 commit comments