Welcome. Please share the exact command you tried. Before and after images may also help.
In that usage example, the input and output canvas sizes are the same. Is this what you are seeing, and what you want?
Reversed Bilinear Distortion + Crop
- GreenKoopa
- Posts: 457
- Joined: 2010-11-04T17:24:08-07:00
- Authentication code: 8675308
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Reversed Bilinear Distortion + Crop
Also post your IM version and platform
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Reversed Bilinear Distortion + Crop
You would be better to use distort perspective
see
http://www.imagemagick.org/Usage/distorts/#perspective
http://www.imagemagick.org/Usage/distor ... rol_points
see
http://www.imagemagick.org/Usage/distorts/#perspective
http://www.imagemagick.org/Usage/distor ... rol_points
- GreenKoopa
- Posts: 457
- Joined: 2010-11-04T17:24:08-07:00
- Authentication code: 8675308
Re: Reversed Bilinear Distortion + Crop
I'm not clear on your meaning. Do you know about the viewport setting of -distort ?etb972 wrote:the problem is that my image is not croped.. and has not the good size !
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Reversed Bilinear Distortion + Crop
I would use distort perspective for this. To avoid unnecessary processing, I'd start with an approximate crop. Windows scripts:
The corners of the posters have approximate coordinates:
58,208
1384,65
1366,2379
50,2243
I would shift these points to the corners of a rectangle that contains them:
58,208 58,65
1384,65 1384,65
1366,2379 1384,2379
50,2243 58,2379
So we have:
You can now crop this down to the poster and resize, if you want.
Code: Select all
convert 807434source.jpg ^
-crop 1500x2400+1400+200 ^
+repage ^
p0.png
58,208
1384,65
1366,2379
50,2243
I would shift these points to the corners of a rectangle that contains them:
58,208 58,65
1384,65 1384,65
1366,2379 1384,2379
50,2243 58,2379
So we have:
Code: Select all
convert 807434source.jpg ^
-crop 1500x2400+1400+200 ^
+repage ^
-distort perspective "58,208 58,65 1384,65 1384,65 1366,2379 1384,2379 50,2243 58,2379" ^
p1.png
snibgo's IM pages: im.snibgo.com