perspective projection example fails

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
pospiech
Posts: 5
Joined: 2012-09-09T00:41:12-07:00
Authentication code: 67789

perspective projection example fails

Post by pospiech »

I want to apply perspective transformations to images.

I tried the example from http://www.imagemagick.org/Usage/distor ... projection:

Code: Select all

convert inu01.jpg  -matte -virtual-pixel transparent -distort Perspective '0,0,0,0  0,90,0,90  90,0,90,25  90,90,90,65' inu01-p.png
on windows 7 but it fails with
>convert inu01.jpg -matte -virtual-pixel transparent -distort Perspective '0,0,0,0 0,90,0,90 90,0,90,25 90,90,90,65' inu01-p.png
convert.exe: invalid argument for option Affine : 'require at least 1 CPs' @ error/distort.c/GenerateCoefficients/529.
convert.exe: unable to open image `0,90,0,90': No such file or directory @ error/blob.c/OpenBlob/2642.
convert.exe: no decode delegate for this image format `0,90,0,90' @ error/constitute.c/ReadImage/544.
convert.exe: unable to open image `90,0,90,25': No such file or directory @ error/blob.c/OpenBlob/2642.
convert.exe: no decode delegate for this image format `90,0,90,25' @ error/constitute.c/ReadImage/544.
convert.exe: unable to open image `90,90,90,65'': No such file or directory @ error/blob.c/OpenBlob/2642.
convert.exe: no decode delegate for this image format `90,90,90,65'' @ error/constitute.c/ReadImage/544.
what is going wrong here?
pospiech
Posts: 5
Joined: 2012-09-09T00:41:12-07:00
Authentication code: 67789

Re: perspective projection example fails

Post by pospiech »

The single quotes must be replace by double quotes. Though I do not understand why convert behaves different on windows ...
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: perspective projection example fails

Post by pipitas »

pospiech wrote:The single quotes must be replace by double quotes. Though I do not understand why convert behaves different on windows ...
It is not convert's different behavior. It's the operating system which behaves differently.

Please read this for a better understanding: http://www.imagemagick.org/Usage/windows/
Post Reply