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.
distort equivalent on version 6.2.8
Re: distort equivalent on version 6.2.8
What about -affine or -transform ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: distort equivalent on version 6.2.8
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: distort equivalent on version 6.2.8
These do not generate distance perspective.Bonzo wrote:What about -affine or -transform ?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/