Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Sample Resize Operation Not Maintaining Aspect

$
0
0
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.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>