Browse Source

Correct missing frame counter check

pull/1918/head
Ynse Hoornenborg 4 years ago
parent
commit
dd31636bd2
  1. 2
      src/ImageSharp/Formats/Gif/GifEncoderCore.cs

2
src/ImageSharp/Formats/Gif/GifEncoderCore.cs

@ -330,7 +330,7 @@ namespace SixLabors.ImageSharp.Formats.Gif
private void WriteApplicationExtensions(Stream stream, int frameCount, ushort repeatCount, XmpProfile xmpProfile)
{
// Application Extension: Loop repeat count.
if (repeatCount != 1)
if (frameCount > 1 && repeatCount != 1)
{
var loopingExtension = new GifNetscapeLoopingApplicationExtension(repeatCount);
this.WriteExtension(loopingExtension, stream);

Loading…
Cancel
Save