Convert IM command to Magick.NET
Posted: 2017-12-20T23:46:45-07:00
Hi, I have an IM command and I need it to be translated to Magick.net and replace the background to transparent.
Here is the command:
convert.exe test.psd[0] -alpha transparent -clip -alpha opaque -background white -flatten -resize 1000x1000 result.psd
I've tried this code below but it doesn't seem to work.
Here is the command:
convert.exe test.psd[0] -alpha transparent -clip -alpha opaque -background white -flatten -resize 1000x1000 result.psd
I've tried this code below but it doesn't seem to work.
Code: Select all
using (var imagePath = new MagickImage(fileNamePath))
{
imagePath.Alpha(AlphaOption.Transparent);
imagePath.Clip("Path 1", true);
imagePath.Alpha(AlphaOption.Opaque);
imagePath.Write("testPath.psd");
}