-
-
Notifications
You must be signed in to change notification settings - Fork 888
Closed
Labels
Milestone
Description
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
DEBUGandRELEASEmode - I have searched open and closed issues to ensure it has not already been reported
Description
Trying to load a jpeg image (1024x36000) fails with following stack trace.
Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: minimumLength
at System.Buffers.ConfigurableArrayPool`1.Rent(Int32 minimumLength)
at SixLabors.Memory.ArrayPoolMemoryAllocator.Allocate[T](Int32 length, AllocationOptions options)
at SixLabors.ImageSharp.Memory.MemoryAllocatorExtensions.Allocate2D[T](MemoryAllocator memoryAllocator, Int32 width, Int32 height, AllocationOptions options)
at SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder.JpegComponent.Init()
at SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder.JpegFrame.InitComponents()
at SixLabors.ImageSharp.Formats.Jpeg.JpegDecoderCore.ProcessStartOfFrameMarker(Int32 remaining, JpegFileMarker& frameMarker, Boolean metadataOnly)
at SixLabors.ImageSharp.Formats.Jpeg.JpegDecoderCore.ParseStream(Stream stream, Boolean metadataOnly)
at SixLabors.ImageSharp.Formats.Jpeg.JpegDecoderCore.Decode[TPixel](Stream stream)
at SixLabors.ImageSharp.Formats.Jpeg.JpegDecoder.Decode[TPixel](Configuration configuration, Stream stream)
at SixLabors.ImageSharp.Image.Decode[TPixel](Stream stream, Configuration config)
at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Stream stream, IImageFormat& format)
at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, String path)
at dotnet_sample.Program.Main(String[] args) in /home/sinan/tmp/dotnet-sample/Program.cs:line 15
I believe the size of the image does not hit to 2GB or 4GB buffer limits which are mentioned in some other issues.
Steps to Reproduce
- Open GIMP and create an image in 1024x36000 width x height.
- Export as jpeg.
- Try to load the jpeg via
Image.Load.
System Configuration
- ImageSharp version: 1.0.0-dev002315
- Other ImageSharp packages and versions: SixLabors.Core: 1.0.0-dev000096
- Environment (Operating system, version and so on): Ubuntu 18.04
- .NET Framework version: 2.1 (also tried with 2.2)
- Additional information:
Test file: sample.zip