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

New Post: Resize is not working properly

$
0
0
Resize is working properly but it is not doing what you are expecting. This looks like a rounding error but it isn't. The following page has a great explanation: http://www.imagemagick.org/Usage/resize/#resize. If you specify the width and the height the resized image will fit into the requested size. It does NOT fill, the requested box size. What you could do is first resize the image and the extend the image to the size you want:
MagickImage NewImage = new MagickImage(strTempFile);
NewImage.Resize(750, 256);
NewImage.BackgroundColor = Color.Purple; //This is probably not the best color.
NewImage.Extent(750, 256, Gravity.Center);
NewImage.Format = MagickFormat.Tiff;
NewImage.Write(strFileName);

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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