Skip to content

load gif System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument) #1530

@3400442579

Description

@3400442579

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument)
   at SixLabors.ImageSharp.Memory.Buffer2DRegion`1.Clear()
   at SixLabors.ImageSharp.Formats.Gif.GifDecoderCore.RestoreToBackground[TPixel](ImageFrame`1 frame)
   at SixLabors.ImageSharp.Formats.Gif.GifDecoderCore.ReadFrameColors[TPixel](Image`1& image, ImageFrame`1& previousFrame, Buffer2D`1 indices, ReadOnlySpan`1 colorTable, GifImageDescriptor& descriptor)
   at SixLabors.ImageSharp.Formats.Gif.GifDecoderCore.ReadFrame[TPixel](Image`1& image, ImageFrame`1& previousFrame)
   at SixLabors.ImageSharp.Formats.Gif.GifDecoderCore.Decode[TPixel](BufferedReadStream stream, CancellationToken cancellationToken)
   at SixLabors.ImageSharp.Formats.ImageDecoderUtilities.Decode[TPixel](IImageDecoderInternals decoder, Configuration configuration, Stream stream, Func`3 largeImageExceptionFactory)
   at SixLabors.ImageSharp.Formats.Gif.GifDecoder.Decode(Configuration configuration, Stream stream)
   at SixLabors.ImageSharp.Image.Decode(Stream stream, Configuration config)
   at SixLabors.ImageSharp.Image.WithSeekableStream[T](Configuration configuration, Stream stream, Func`2 action)
   at SixLabors.ImageSharp.Image.Load(Configuration configuration, Stream stream, IImageFormat& format)
   at SixLabors.ImageSharp.Image.Load(Configuration configuration, String path, IImageFormat& format)
   at SixLabors.ImageSharp.Image.Load(String path)
   at GifClient.ViewModels.CropViewModel.<>c__DisplayClass38_0.<SaveAsync>b__1() in E:\lq\GifAdvanced\src\BlueClient\ViewModels\CropViewModel.cs:line 177

Steps to Reproduce

 try
                {
                    Image gimage = Image.Load(sourceGif);
                    //gimage.Mutate(o => o.Crop(new Rectangle(Rect.X, Rect.Y, Rect.Width, Rect.Height)));
                    //gimage.SaveAsGif(fn);
                }

System Configuration

  • ImageSharp version: 1.0.2
  • Other ImageSharp packages and versions:
  • Environment (Operating system, version and so on): win10
  • .NET Framework version: 4.7.2
  • Additional information:

gif file:
aa

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions