This project has moved and is read-only. For the latest updates, please go here.
1

Closed

Arithmetic operation resulted in an overflow

description

Hi, I'm using Magick.NET (NuGet package: Magick.NET-Q16-x64) to retrieve image information from a given image file.

Looks like this:
var info = new MagickImageInfo(stream); // exception gets thrown here
var dpix = info.Density.X;
Everything worked as expected the last months. But currently one image is breaking my code and is throwing an overflow exception.
Stacktrace:
System.OverflowException: Arithmetic operation resulted in an overflow.
       at ImageMagick.MagickImage.NativeMagickImage.get_ResolutionUnits()
     at ImageMagick.MagickImage.get_Density()
     at ImageMagick.MagickImageInfo.Initialize(MagickImage image)
     at ImageMagick.MagickImageInfo.Read(Stream stream)
The image which causes the exception: https://testpublic.blob.core.windows.net/magicknet/BrokenImage.jpg
Closed Jan 25 at 5:05 PM by dlemstra

comments

Robar wrote Jan 25 at 5:04 PM

Issue resolved with upgrade to version 7.0.4.400