Skip to content

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

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

Activity

  1. added this to the milestone on Jan 14, 2021
  2. antonfirsov commented on Jan 14, 2021

    @antonfirsov
    Member

    I confirm this repros with current master.

  3. added 2 commits that reference this issue on Jan 14, 2021
    f85b686
    0830a97
  4. linked a pull request that will close this issueFix for Issue #1505 #1506on Jan 14, 2021
  5. added a commit that references this issue on Jan 15, 2021
  6. added 3 commits that reference this issue on Mar 13, 2021
    a968b28
    94829b8
    fade757
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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