Hi,
We are using magick.net for getting some image informations (get colorspace, bit per sample, etc.) and in some case, we have to transform the same files (dropped in our main app) to tiff. For getting info, we use the code below. On opening large Tiff (>2GB Tiff), we get instantly an OverflowException, Arithmetic operation resulted in an overflow. at ImageMagick.MagickReader.Read(Stream stream)
Any idea we can overcome this. We currently use the V6 of magick.net. Q8 - X64
The whole project is X64 based, not anyCpu.
```
FileStream imageStream = new FileStream(TiffFile, FileMode.Open, FileAccess.Read);
MagickImage currentImage;
ImageMagick.ColorSpace orgColorspace;
try
{
currentImage = new MagickImage(imageStream);
orgColorspace = currentImage.ColorSpace;
if (currentImage.ReadWarning != null)
{
log.Info("RipTiff : Warning on opening file : " + TiffFile + " : " + currentImage.ReadWarning.Message);
}
}
```
Comments: Thanks for sending me the file. With the latest version of Magick.NET I am able to open, resize and save the image. It takes a while because the size is 20950x26381 but it finishes without any complaints. p.s. If you just want the to know the colorspace it might be better to use the Ping method of MagickImage instead. This will not decode the pixels.
We are using magick.net for getting some image informations (get colorspace, bit per sample, etc.) and in some case, we have to transform the same files (dropped in our main app) to tiff. For getting info, we use the code below. On opening large Tiff (>2GB Tiff), we get instantly an OverflowException, Arithmetic operation resulted in an overflow. at ImageMagick.MagickReader.Read(Stream stream)
Any idea we can overcome this. We currently use the V6 of magick.net. Q8 - X64
The whole project is X64 based, not anyCpu.
```
FileStream imageStream = new FileStream(TiffFile, FileMode.Open, FileAccess.Read);
MagickImage currentImage;
ImageMagick.ColorSpace orgColorspace;
try
{
currentImage = new MagickImage(imageStream);
orgColorspace = currentImage.ColorSpace;
if (currentImage.ReadWarning != null)
{
log.Info("RipTiff : Warning on opening file : " + TiffFile + " : " + currentImage.ReadWarning.Message);
}
}
```
Comments: Thanks for sending me the file. With the latest version of Magick.NET I am able to open, resize and save the image. It takes a while because the size is 20950x26381 but it finishes without any complaints. p.s. If you just want the to know the colorspace it might be better to use the Ping method of MagickImage instead. This will not decode the pixels.