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

New Post: Cropping image

$
0
0
You can use the Extent method of MagickImage to do this.
int x = -100;
int y = -100;
int width = 500;
int height = 200;

using (MagickImage image = new MagickImage("logo:"))
{
  image.BackgroundColor = new MagickColor("blue");
  image.Extent(new MagickGeometry(x, y, width, height));
  image.Write("output.png");
}
p.s. I will add a new overload in the next version so you can do this:
image.Extent(x, y, width, height);

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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