This project has moved. For the latest updates, please go here.

Can Magick.Net get output from commands such as Trim

Mar 12, 2015 at 9:34 PM
Hello. I want to ask if it is possible to get output(offset and size of trimmed image) from TRIM command. Or it is better way to translate this ImageMagickto command line to Magick.NET:

convert noisy.jpg -crop \
`convert noisy.jpg -virtual-pixel edge -blur 0x15 -fuzz 15% \
         -trim -format '%wx%h%O' info:`   +repage   noisy_trimmed_2.jpg
Any help would be appreciate.


Best regards,
Kestokas
Coordinator
Mar 13, 2015 at 7:09 AM
You can use the Page property to see what trim has done:
using (MagickImage image = new MagickImage("logo:"))
{
  image.Trim();
  Console.WriteLine(image.Page.ToString());
}
Mar 13, 2015 at 9:05 AM
Thanks for the fast reply. Now i can get the information from command.


Best regards,
Kestokas