Browse Source

re-add comment

pull/2713/head
SpaceCheetah 2 years ago
parent
commit
4698e8ca3b
No known key found for this signature in database GPG Key ID: A60F20D29141DFF9
  1. 3
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

3
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -648,7 +648,8 @@ internal sealed class PngDecoderCore : IImageDecoderInternals
{
frame = image.Frames.AddFrame(previousFrame ?? image.Frames.RootFrame);
// If restoring to before first frame, restore to background. Same if first frame (previousFrameControl null).
// If the first `fcTL` chunk uses a `dispose_op` of APNG_DISPOSE_OP_PREVIOUS it should be treated as APNG_DISPOSE_OP_BACKGROUND.
// So, if restoring to before first frame, clear entire area. Same if first frame (previousFrameControl null).
if (previousFrameControl == null || (previousFrame is null && previousFrameControl.Value.DisposeOperation == PngDisposalMethod.RestoreToPrevious))
{
Buffer2DRegion<TPixel> pixelRegion = frame.PixelBuffer.GetRegion();

Loading…
Cancel
Save