每当我们使用imagemagick convert命令应用某些变换时,它会尝试确保生成的图像与原始图像的大小相同。有没有办法让我们得到整个渲染图像的透明/白色背景。
convert -verbose maanavulu_GIST-TLOTKrishna.tif \
-alpha set -matte -virtual-pixel transparent \
-distort perspective-projection '1.06,0,0.0,0,2.066,0.0,0.0,0.0' \
1.jpg
答案 0 :(得分:0)
fx
& repage
文档暗示option:distort:viewport
。我发现最简单的方法是将Distorting Usage convert -verbose maanavulu_GIST-TLOTKrishna.tif \
-alpha set -matte -virtual-pixel transparent \
-set option:distort:viewport 1000x1000 \
-distort perspective-projection '1.06,0,0.0,0,2.066,0.0,0.0,0.0' \
-trim 1.jpg
选项设置为足以捕获整个失真的内容,然后set将其设置为最终尺寸。
{{1}}