Page 1 of 1

+distort Plane2Cylinder center_x,y usage

Posted: 2017-01-12T06:06:38-07:00
by battle
How do I specify center_x,y in Plane2Cylinder?

The v6 distortion of images examples page states
The The 'Plane2Cylinder' distort is the reverse of the above projection, and takes the parameters...
fov_angle center_x,y
and give a use example without center_x,y
convert p90_plane.png -virtual-pixel Black \
+distort Plane2Cylinder 90.467 p90_restored.png
which only uses the fov-angle.

I've tried putting it in with a space after the fov_angle and I get this error
convert: unable to open image `2139,750': No such file or directory @ error/blob.c/OpenBlob/2695.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.

putting a \ in before the output_image_name does not help.

Thanks.

Re: +distort Plane2Cylinder center_x,y usage

Posted: 2017-01-12T06:15:07-07:00
by snibgo
battle wrote:The v6 distortion of images examples page states
What is the page URL?

Re: +distort Plane2Cylinder center_x,y usage

Posted: 2017-01-12T10:11:31-07:00
by fmw42

Re: +distort Plane2Cylinder center_x,y usage

Posted: 2017-01-12T10:29:58-07:00
by snibgo
Thanks. Is there a reason why Plane2Cylinder and Cylinder2Plane aren't on the usual options page http://www.imagemagick.org/script/comma ... hp#distort ?

I suppose these multiple arguments, if separated by spaces, must be quoted so they are treated as a single unit.

Re: +distort Plane2Cylinder center_x,y usage

Posted: 2017-01-12T14:20:50-07:00
by fmw42
I suppose they are not documented there because they were the last ones implemented by Anthony and he forgot that document.

Re: +distort Plane2Cylinder center_x,y usage

Posted: 2017-01-16T22:46:53-07:00
by anthony
You can you either spaces, tabs, newlines or commas. in the arguments.

But it must be given as a single argument which for whitespace means quotes around the argument.\

Basically quoting makes more sense as the spacing helps distinguish the x,y argument from the rest, but IM itself does not care.

It was documented, just not exampled, as basically it wasn't very useful to do. By default it uses the center of the image.

NOTE the coordinates are image coordinates, not pixel coordinates. It can be a floating point sub-pixel position.
http://www.imagemagick.org/Usage/distor ... oordinates