公告
财富商城
积分规则
提问
发文
2020-07-29 06:05发布
我命由我不由天
I have 4 (x,y) coordinates between which I want place image as example given below.
The whole image must be placed within this area without cropping.
Using this 800x600 balloon:
You can use a "Perspective Distort" like this:
convert balloon.jpg -matte -virtual-pixel transparent \ -distort Perspective '0,0,50,0 0,599,100,599 800,0,750,100 800,600,500,500' result.png
There are basically 4 pairs of points in the parameters,i.e.
Pt1X,Pt1Y,Pt1NewX,Pt1NewY Pt2X,Pt2Y,Pt2NewX,Pt2NewY Pt3X,Pt3Y,Pt3NewX,Pt3NewY Pt4X,Pt4Y,Pt4NewX,Pt4NewY
So the command above moves point 0,0 to 50,0 and moves point 0,599 to 100,599 and so on.
0,0
50,0
0,599
100,599
I have labelled each of the points in red and drawn the path along which each one has moved in green.
最多设置5个标签!
Using this 800x600 balloon:
You can use a "Perspective Distort" like this:
There are basically 4 pairs of points in the parameters,i.e.
So the command above moves point
0,0
to50,0
and moves point0,599
to100,599
and so on.I have labelled each of the points in red and drawn the path along which each one has moved in green.