Page 1 of 1

distort equivalent on version 6.2.8

Posted: 2009-11-12T07:14:59-07:00
by bhattkrishna19
We want to modify an image (png file) so that it become visible like it's an item viewed from a distance. We do it by distorting it as follows
> convert sample.png -mattecolor none -virtual-pixel background -background transparent -distort Perspective "0,0 242,208 300,0 246,258 0,450 39,199 300,450 32,265" tilted_sample.png

We want to place this 3d view of the image inside another image and hence we know the 4 coordinates of the image in which this distorted image has to be placed.

But the ditort command only works with latest version of Image magick and not version 6.2.8 . Is there an alternate way to shear it but through coordinates and not through x and y % of shear.

Re: distort equivalent on version 6.2.8

Posted: 2009-11-12T08:29:45-07:00
by Bonzo
What about -affine or -transform ?

Re: distort equivalent on version 6.2.8

Posted: 2009-11-12T10:13:45-07:00
by fmw42
you can use -fx to create your own perspective projection equations as per http://www.imagemagick.org/Usage/distor ... projection but you will need to solve the perspective equations for the coefficients from your control points yourself.

Re: distort equivalent on version 6.2.8

Posted: 2009-11-19T20:06:41-07:00
by anthony
Bonzo wrote:What about -affine or -transform ?
These do not generate distance perspective.