Hello,
sorry, I am very new to ImageMagick. I have this command line arguments, that I need to convert to .NET / c#:
-define psd:alpha-unblend=off -trim "inout image" -clip-mask -resize 1600> "outputimage"
I've got this so far:
var setting = new MagickReadSettings { Defines = new PsdReadDefines { AlphaUnblend = false } };
using (var image = new MagickImage(file, setting))
{
image.Trim();
image.Resize(new MagickGeometry { Greater = true, Width = _maxSize, Height = _maxSize });
return image.ToByteArray(MagickFormat.Png);
}
I do not know how to get -clip-mask into c#. Using the above code works, but produces a PNG with a "black" background in some image viewers. Using Image Magick with the native commandline args above does not yield this black background.
I am very thankful for any help.
Best,
Anders Pedersen
Equivalent of clip-mask
Re: Equivalent of clip-mask
image.Clip is the equivalent of -clip-mask in Magick.NET