This project has moved. For the latest updates, please go here.

Sample Resize Operation Not Maintaining Aspect

Aug 11, 2016 at 3:18 PM
Using an original image with the dimensions of 2480 x 3508, if sample resizing is used specifying a new width and height of 400 x 400, the image is resized to 400 x 400 when it should maintain its aspect despite the inputs and be a final size of 283 x 400.
using (MagickImage image = new MagickImage(new FileInfo(Directory.GetCurrentDirectory() + "\\Resources\\sample_this.jpg")))
{
     image.Sample(new MagickGeometry(400, 400));
}
The command line using ImageMagick directly produces the correct output:
magick convert sample_this.jpg -sample 400x400 sample_this_final.jpg
Results do not match between direct use of ImageMagick and Magick.NET in this scenario.
Coordinator
Aug 11, 2016 at 3:20 PM
And which version of Magick.NET are you using?
Aug 11, 2016 at 4:17 PM
I'm using version 7.0.2.600
Coordinator
Aug 11, 2016 at 7:43 PM
I can confirm this is a bug in the current version of Magick.NET. I just pushed a patch to make sure this is resolved in the next version.
Aug 12, 2016 at 5:43 PM
Excellent, thanks!