Quantcast
Viewing all articles
Browse latest Browse all 35

MagickWand • distort:viewport

Hi,

I have got the following magick command line which I want to convert to DLL calls:

CODE:

@echo offset MAGICK=PathToMagickExeset IN=InputFilenameset OUT2=OutputFilenamerem TLS = top left sourcerem TLT = top left targetrem TRS = top right sourcerem ...rem BLT = bottom left targetset TLS=0.5,18.5set BLS=0.5,464.5set TRS=639.5,42.5set BRS=639.5,445.5set TLT=0.5,30.5set BLT=0.5,460.5set TRT=639.5,30.5set BRT=639.5,460.5set VIEWPORT=640x431+0+30set COORDS2="%TLS% %TLT% %TRS% %TRT% %BRS% %BRT% %BLS% %BLT%"%MAGICK% %IN% -define distort:viewport=%VIEWPORT% -distort Perspective %COORDS2% +repage %OUT2%
The command line produces exactly what I want.

I also have got the basic code for the DistortImage call:

CODE:

MagickDistortImage(wand, PerspectiveDistortion, 16, Params, false);
But I can't figure out the API equivalent of the -define distort:viewport=%VIEWPORT% part.

Any pointers would be appreciated.

Statistics: Posted by dummzeuch — 2019-10-23T02:41:06-07:00



Viewing all articles
Browse latest Browse all 35

Trending Articles