Converting CLI Command to C#

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Posts: 3
Joined: 2018-06-07T20:27:18-07:00
Authentication code: 1152

Converting CLI Command to C#

Post by dbudnick » 2018-07-14T23:13:37-07:00

Hi all users!

I have written the command below in the ImageMagick CLI and I would love to use it in the C#.NET but I am not sure how to convert this command. :lol:

convert t.png \(Trent - Fri2.jpg - resize 1670x1070! \) -geometry + 440 + 478 - composite Trent - Fri2.pdf

Thanks in advance.

David 8)

User avatar
Posts: 25751
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting CLI Command to C#

Post by fmw42 » 2018-07-14T23:50:25-07:00

I cannot give C# code. But be careful. If your images have spaces in the names, you need to put quotes around the images; otherwise ImageMagick thinks you have two different images. You must also have a space between the parentheses and the command.

Code: Select all

convert t.png \( "Trent - Fri2.jpg" - resize 1670x1070! \) -geometry + 440 + 478 - composite "Trent - Fri2.pdf"
Note also writing to PDF will just put the raster image into a vector shell. It does not vectorize the raster image.

Post Reply