使用ImageMagick创建的偏移堆叠图像
我目前正在使用以下ImageMagick命令从多个JPG图像创建照片的“宝丽来堆栈”使用ImageMagick创建的偏移堆叠图像,imagemagick,Imagemagick,我目前正在使用以下ImageMagick命令从多个JPG图像创建照片的“宝丽来堆栈” convert \ img-5.jpg -thumbnail 300x200 -bordercolor white -border 10 \ -bordercolor grey60 -border 1 -bordercolor none \ -background none -rotate -4 \ \ \( img-2.jpg -thumbnail 300x200 -b
convert \
img-5.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate -4 \
\
\( img-2.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate 6 \
\) \
\
\( img-3.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate -2 \
\) \
\
\( img-1.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate -4 \
\) \
\
\( img-4.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate 4 \
\) \
\
-border 100x80 -gravity center +repage -flatten -trim +repage \
-background black \( +clone -shadow 60x4+4+4 \) +swap -background none \
-flatten stack.png
此命令生成以下图像:
我想能够做的是将图像偏移到当前由“旋转”选项使用的中心轴之外,以便在照片之间有更多的水平(可能还有一点垂直)间隔
更具体地说,我希望通过将最上面的图像左右移动(或者上下移动一点),能够看到更多的底层图像,这些图像显示在最上面的图像的边缘周围
我可以向上面的convert调用中添加哪些命令来实现这一点
-repage geometry
Adjust the canvas and offset information of the image.
这是imagemagick.org上的一个好例子感谢@Iamiuru让我走上了正确的道路。不幸的是,仅靠重新分页是不够的,我不得不在其他地方做一些调整以使其工作 下面是我最后使用的命令:
convert \
img-5.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate 3 -repage -20-5 \
\
\( img-2.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate -5 -repage -10+0 \
\) \
\
\( img-3.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate 4 -repage -30+10 \
\) \
\
\( img-1.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate -4 -repage +20-10 \
\) \
\
\( img-4.jpg -thumbnail 300x200 -bordercolor white -border 10 \
-bordercolor grey60 -border 1 -bordercolor none \
-background none -rotate 2 \
\) \
\
-border 100x80 -flatten -trim +repage -background black \
\( +clone -shadow 60x4+4+4 \) +swap -background none -flatten stack.png
从最初的命令中,我必须删除-gravity center+repage
选项,因为这些选项只是将所有图像重新居中到其原始位置,而-repage无法工作
此命令生成以下图像:
谢谢-这正是我需要的。我发现我必须对我原来的命令做一些其他的调整,以使它工作。