Page 1 of 1

PM Distort syntax for Arc

Posted: 2016-03-23T05:52:10-07:00
by gubach
After it was clarifyed that Arc and Polar are available via PM the question how to translate the
command line syntax remains. Here examples for the simplified and complete Arc syntax:

a) Arc with simplified syntax
command line: convert input.png -virtual-pixel HorizontalTile -background black -distort Arc 360 output.png

PM: $image->Distort(method=>'Arc', points=>'360', 'virtual-pixel'=>'HorizontalTile', background=>'black');


b) Arc with complete syntax
command line: convert input -virtual-pixel HorizontalTile -background black -distort Arc '360 0 2000 0' output

PM: $arc_string = '360 0 ' . $arc_ring_radius . ' 0';
$image->Distort(method=>'Arc', points=>"$arc_string", 'virtual-pixel'=>'HorizontalTile', background=>'black');


Both PM statements are not working; no error messages but $image remain unchanged. What went wrong?
Thank you!

Re: PM Distort syntax for Arc

Posted: 2016-03-26T03:26:20-07:00
by gubach
Please help with the PM syntax because writing an intermediate png costs a lot of time in my huge batch runs. I cant find any PM arc examples on Google. Thank you very much!