PM Distort syntax for Arc
Posted: 2016-03-23T05:52:10-07:00
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!
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!