1条回答 默认 最新
- duannao3819 2013-12-22 06:53关注
If you want your image to be 318px x 235px (to fit in the window of your template), you can resize using ImageMagick:
convert photo-big.jpg -resize '318x235^' photo-small.jpg
The
^
insures that the small version will not be any smaller than the given dimensions, although one dimension may be bigger, in order to maintain the aspect ratio.In order to insert the resized image into your template, you'll need a third image to serve as a mask. The mask is only black and white: the white is where you want the photo to show up in your template, like this:
Use the following line of code to create your composite image. The geometry indicates the offset in pixels (59 down and 15 over) to position the photo in the window:
composite -geometry '+15+59' photo-small.jpg template.jpg mask.jpg comp.jpg
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥100 set_link_state
- ¥15 虚幻5 UE美术毛发渲染
- ¥15 CVRP 图论 物流运输优化
- ¥15 Tableau online 嵌入ppt失败
- ¥100 支付宝网页转账系统不识别账号
- ¥15 基于单片机的靶位控制系统
- ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
- ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
- ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
- ¥15 手机接入宽带网线,如何释放宽带全部速度