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


Arithmetic operation resulted in an overflow


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.
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:
Closed Jan 25 at 5:05 PM by dlemstra


Robar wrote Jan 25 at 5:04 PM

Issue resolved with upgrade to version