+distort Plane2Cylinder center_x,y usage

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
battle
Posts: 1
Joined: 2017-01-12T05:55:51-07:00
Authentication code: 1151

+distort Plane2Cylinder center_x,y usage

Post 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.
--
Battle
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: +distort Plane2Cylinder center_x,y usage

Post by snibgo »

battle wrote:The v6 distortion of images examples page states
What is the page URL?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: +distort Plane2Cylinder center_x,y usage

Post by fmw42 »

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

Re: +distort Plane2Cylinder center_x,y usage

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: +distort Plane2Cylinder center_x,y usage

Post by fmw42 »

I suppose they are not documented there because they were the last ones implemented by Anthony and he forgot that document.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: +distort Plane2Cylinder center_x,y usage

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply