Browse Source

Fix condition for frame loop increment in DrawImageProcessor to ensure correct repeat count handling.

pull/2995/head
予纾 7 months ago
parent
commit
e749f3fa83
  1. 2
      src/ImageSharp/Processing/Processors/Drawing/DrawImageProcessor{TPixelBg,TPixelFg}.cs

2
src/ImageSharp/Processing/Processors/Drawing/DrawImageProcessor{TPixelBg,TPixelFg}.cs

@ -141,7 +141,7 @@ internal class DrawImageProcessor<TPixelBg, TPixelFg> : ImageProcessor<TPixelBg>
new Rectangle(0, 0, foregroundRectangle.Width, foregroundRectangle.Height),
in operation);
if (this.RepeatCount is 0 || this.currentFrameLoop / this.ForegroundImage.Frames.Count <= this.RepeatCount)
if (this.RepeatCount is 0 || this.currentFrameLoop / this.ForegroundImage.Frames.Count < this.RepeatCount)
{
this.currentFrameLoop++;
}

Loading…
Cancel
Save