Need help using the -set option:distory:viewport CMD command in 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
DewGaming
Posts: 3
Joined: 2019-12-12T11:56:19-07:00
Authentication code: 1152

Need help using the -set option:distory:viewport CMD command in C#

Post by DewGaming »

I have this command

Code: Select all

convert image.png -virtual-pixel none -set option:distort:viewport "%[fx:max(w,h)]x%[fx:max(w,h)]-%[fx:max((h-w)/2,0)]-%[fx:max((w-h)/2,0)]" -filter point -distort SRT 0 +repage image.png
used to square an image of unknown height or width with the new space create be transparent. I have everything converted except the

Code: Select all

-set option:distort:viewport "%[fx:max(w,h)]x%[fx:max(w,h)]-%[fx:max((h-w)/2,0)]-%[fx:max((w-h)/2,0)]"
part. Any know how to convert this?

snibgo
Posts: 12863
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Need help using the -set option:distory:viewport CMD command in C#

Post by snibgo »

Have you tried SetArtifact()?
snibgo's IM pages: im.snibgo.com

DewGaming
Posts: 3
Joined: 2019-12-12T11:56:19-07:00
Authentication code: 1152

Re: Need help using the -set option:distory:viewport CMD command in C#

Post by DewGaming »

What string values would I use in this instance?

snibgo
Posts: 12863
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Need help using the -set option:distory:viewport CMD command in C#

Post by snibgo »

snibgo's IM pages: im.snibgo.com

DewGaming
Posts: 3
Joined: 2019-12-12T11:56:19-07:00
Authentication code: 1152

Re: Need help using the -set option:distory:viewport CMD command in C#

Post by DewGaming »

Thanks!

Post Reply