Page 1 of 1

Convert command line to C# .net

Posted: 2018-07-28T01:46:01-07:00
by MohammadSoori
Hi all, I want to convert following command line to c# code.

Code: Select all

magick \( image.png +repage -bordercolor white -border 1x1 \
-fill transparent -floodfill +0+0 white -shave 1x1 +write tmp0.png \) \
\( -clone 0 -fill white -colorize 100% \) \
\( -clone 0 -alpha extract +write tmp1.png -write mpr:alpha -morphology edgeout octagon:10 +write tmp2.png \) \
-alpha off -compose over -composite +write tmp3.png \
\( mpr:alpha -morphology dilate octagon:10 -blur 0x1 -level 50x100% +write tmp4.png \) \
-alpha off -compose copy_opacity -composite \
result1.png

Re: Convert command line to C# .net

Posted: 2018-07-28T12:27:59-07:00
by dlemstra
And what have you tried so far?

Re: Convert command line to C# .net

Posted: 2018-07-28T13:12:01-07:00
by fmw42
MohammadSoori wrote: 2018-07-28T01:46:01-07:00 Hi all, I want to convert following command line to c# code.

Code: Select all

magick \( image.png +repage -bordercolor white -border 1x1 \
-fill transparent -floodfill +0+0 white -shave 1x1 +write tmp0.png \) \
\( -clone 0 -fill white -colorize 100% \) \
\( -clone 0 -alpha extract +write tmp1.png -write mpr:alpha -morphology edgeout octagon:10 +write tmp2.png \) \
-alpha off -compose over -composite +write tmp3.png \
\( mpr:alpha -morphology dilate octagon:10 -blur 0x1 -level 50x100% +write tmp4.png \) \
-alpha off -compose copy_opacity -composite \
result1.png
Where did you find/get this code? If from an example or script, it might help to know what the example or script was trying to do? At least provide you input and output example. Testing your code on an arbitrary image does not change the input.

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620