Problem with Distort Perspective Command

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
ahikaz
Posts: 3
Joined: 2011-08-29T07:25:44-07:00
Authentication code: 8675308

Problem with Distort Perspective Command

Post by ahikaz »

Hello, i'm trying to apply this code in my ".bat" file:

Code: Select all

convert checks.png        -matte    -virtual-pixel transparent -distort Perspective '0,0,0,0  0,90,0,90  90,0,90,25  90,90,90,65' checks_pers.png
The problem is that the result is like the original, no trnasformation to see, but i want to have a 3D Cover.
I tried also many examples of the tutorial and they work only the distort Perspective... :?


PS : I installed this version of ImageMagick : ImageMagick-6.7.2-0-Q16-windows-dll

Thank you.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with Distort Perspective Command

Post by fmw42 »

The command works fine for me in IM 6.7.2.0 Q16 MAC OSX Tiger. But try double quotes rather than single quotes. I am not sure if that is the issue or not as I am not a windows user. so see http://www.imagemagick.org/Usage/windows/

Otherwise it could be your bat file and not the command, so try the command in command line mode by itself to test this.
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: Problem with Distort Perspective Command

Post by whugemann »

I think that there are two errors in your command:

1) First of all, single quotes must be substituted by double quotes under Windows, as explained at
http://www.imagemagick.org/Usage/windows/#conversion

2) Second, there are too many commas in your point list. The example given in the "DOS box" at http://www.imagemagick.org/script/comma ... hp#distort is incorrect. The point list should be ordered:
u1,v1 X1,Y1 u2,v2 X2,Y2 ...
i.e. a comma seperates the two coordinates of a point, but not the corresponding image and world point. Perhaps the extras commas do no harm under certain operating systems, but they are inconsistent with the documentation.
Wolfgang Hugemann
ahikaz
Posts: 3
Joined: 2011-08-29T07:25:44-07:00
Authentication code: 8675308

Re: Problem with Distort Perspective Command

Post by ahikaz »

Thanks ! It work with the double quotes ! :D
Post Reply