Page 1 of 1

perspective projection example fails

Posted: 2012-09-09T00:45:33-07:00
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?

Re: perspective projection example fails

Posted: 2012-09-09T01:01:35-07:00
by pospiech
The single quotes must be replace by double quotes. Though I do not understand why convert behaves different on windows ...

Re: perspective projection example fails

Posted: 2012-09-09T01:20:24-07:00
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/