Skip to content

System.ArgumentOutOfRangeException: 'Specified argument was out of the range of valid values.' #1505

@albertwoo

Description

@albertwoo

Description

Before I use SixLabors.ImageSharp Version="1.0.0-beta0007" it works fine. Now I updated to 1.0.2 I got this error.

You can use FSharp scripts (with the attached gif) to reproduce

#r "nuget:SixLabors.ImageSharp,1.0.2"
open SixLabors.ImageSharp
let img = Image.Load("the path of the downloaded attch gif")
img.Save("the path to save the gif")

Exception:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at SixLabors.ImageSharp.Processing.Processors.Quantization.OctreeQuantizer`1.AddPaletteColors(Buffer2DRegion`1 pixelRegion)
   at SixLabors.ImageSharp.Processing.Processors.Quantization.QuantizerUtilities.BuildPaletteAndQuantizeFrame[TPixel](IQuantizer`1 quantizer, ImageFrame`1 source, Rectangle bounds)
   at SixLabors.ImageSharp.Formats.Gif.GifEncoderCore.EncodeLocal[TPixel](Image`1 image, IndexedImageFrame`1 quantized, Stream stream)
   at SixLabors.ImageSharp.Formats.Gif.GifEncoderCore.Encode[TPixel](Image`1 image, Stream stream, CancellationToken cancellationToken)
   at SixLabors.ImageSharp.Formats.ImageEncoderUtilities.Encode[TPixel](IImageEncoderInternals encoder, Image`1 image, Stream stream)
   at SixLabors.ImageSharp.Image.Save(Stream stream, IImageEncoder encoder)
   at SixLabors.ImageSharp.ImageExtensions.Save(Image source, String path, IImageEncoder encoder)
   at <StartupCode$FSI_0004>.$FSI_0004.main@() in D:\Code\GitPrivate\MyFSharpScripts\Playground\ImageProcess.fsx:line 5
  • ImageSharp version: 1.0.2
  • Other ImageSharp packages and versions:
  • Environment (Operating system, version and so on): windows 10
  • .NET Framework version: .net 5.0

Sql provider

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions