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

Poor quality with Resize-method of Magick.NET

Oct 8, 2014 at 12:40 AM
I was wondering if the Resize-method of Magick.NET is the same as the command-line version "convert.exe" of ImageMagick?

I compared the results and stated a very poor quality with Magick.NET when downsizing big image files to very small images (4000x3000 Pixel to 300x225 Pixel).

I used the same Q8-Version on a x64 machine (Magick.NET and ImageMagick with convert.exe).
Oct 8, 2014 at 5:59 AM
The Resize method in Magick.NET is the same as the -resize option of convert.exe. But you are probably using the ImageMagick 6 version of convert.exe. Magick.NET uses the new version 7 library of ImageMagick. This might be a bug in version 7. There is also a possibility that you are using the Q16 version of ImageMagick (convert -version). Can you post an input image and a small code example of how you did the resize (IM and Magick.NET) on something like dropbox?
Oct 8, 2014 at 5:26 PM
You are correct. I am using the following version im convert.exe (output of 'convert.exe --version')
Version: ImageMagick 6.8.9-6 Q8 x64 2014-07-22
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib
I switched to the corresponding nuget-package of Magick.NET (Install-Package Magick.NET-Q8-AnyCPU -Version

And voila: the quality is much better and the same as the convert.exe. It seems to be a bug in version 7!
Oct 8, 2014 at 9:33 PM
Edited Oct 9, 2014 at 12:35 PM
Can you post an image and a small code example in something like dropbox so I can reproduce the problem and fix it? I will not publish a new version of Magick.NET that uses ImageMagick 6.
Oct 9, 2014 at 4:41 PM
Of course, here you go: TEXT

There are 4 files in zip-archive
  • The original file that has to be resized
  • the resized file from convert.exe
  • the resized file from dll
  • the resized file from dll
In the dll-cases, the following same code was used:
MagickImage resizeTestImage = new MagickImage(filenameInput);
resizeTestImage.Resize(300, 200);
Oct 9, 2014 at 10:01 PM
Edited Oct 9, 2014 at 10:01 PM
I can confirm this is a bug in ImageMagick 7, thank you for the detailed information on how to reproduce the issue. We recently made some fixes for transparency in IM7 and it seems we also fixed this issue. I will try to publish a new release soon so this issue is gone. I am working on improvements of the PDF error reporting, once that is done a new release will be published.