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

New Post: image.Extent how to get transparent background

$
0
0
You actually found a bug, it's not a feature. It should be white instead of transparent. This will be fixed in the next release. You can do this:
using (MagickImage image = new MagickImage(sPath + "Render3D1.jpg")
{
  image.Resize(300, 300);
  image.Format = MagickFormat.Png;
  // There is an implicit cast from System.Drawing.Color to MagickColor.
  image.Extent(300, 300, Gravity.Center, System.Drawing.Color.Transparent);
  image.Write(sPath + "Render3D1_300_WthGeometry.png");
}
I will create a static property MagickColor.Transparent so you won't have to use System.Drawing.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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