Page 1 of 1

Converting CLI Command to C#

Posted: 2018-07-14T23:13:37-07:00
by dbudnick
Hi all C#.net 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)

Re: Converting CLI Command to C#

Posted: 2018-07-14T23:50:25-07:00
by fmw42
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.