Documentation on https://magick.codeplex.com/wikipage?title=Resize%20image&referringTitle=Documentation is not correct.
// Resize each image in the collection to a width of 200. When zero is specified for the height
// the height will be calculated with the aspect ratio.
foreach (MagickImage image in collection)
{
image.Resize(200, 0);
}
Resize will always be calculated with the aspect ratio.
Use simple example with ie. image size 400 x 300 and call image.Resize(100, 100);
Result will be image with size 100 x 75 instead 100x100 !
This is PROPER resize example without AR:
var geo = new MagickGeometry(100,100);
geo.IgnoreAspectRatio = true;
image.Resize(geo);
New image size is 100x100 (AR 1.0)
Comments: Technically the comment is correct but I agree with you that I should also put another example the explains what will happen when you use Resize and don't specify zero for the height. I will update the examples in a couple of days.
// Resize each image in the collection to a width of 200. When zero is specified for the height
// the height will be calculated with the aspect ratio.
foreach (MagickImage image in collection)
{
image.Resize(200, 0);
}
Resize will always be calculated with the aspect ratio.
Use simple example with ie. image size 400 x 300 and call image.Resize(100, 100);
Result will be image with size 100 x 75 instead 100x100 !
This is PROPER resize example without AR:
var geo = new MagickGeometry(100,100);
geo.IgnoreAspectRatio = true;
image.Resize(geo);
New image size is 100x100 (AR 1.0)
Comments: Technically the comment is correct but I agree with you that I should also put another example the explains what will happen when you use Resize and don't specify zero for the height. I will update the examples in a couple of days.