Imagemagick 调整平铺图像的大小

Imagemagick 调整平铺图像的大小,imagemagick,Imagemagick,考虑以下复合命令: composite -dissolve 50% -tile overlay.png base.png out.png 这将在base.png上平铺overlay.png 如何在平铺之前将图像的大小缩放为平铺,而不是使用单独的命令?可以在ImageMagick中执行此操作,但需要使用转换语法,而且更为复杂 输入: 平铺图像: 结果: 您可以在ImageMagick中执行此操作,但需要使用转换语法,而且更为复杂 输入: 平铺图像: 结果: # read the i

考虑以下
复合
命令:

composite -dissolve 50% -tile overlay.png base.png out.png
这将在
base.png
上平铺
overlay.png


如何在平铺之前将图像的大小缩放为平铺,而不是使用单独的命令?

可以在ImageMagick中执行此操作,但需要使用转换语法,而且更为复杂

输入:

平铺图像:


结果:


您可以在ImageMagick中执行此操作,但需要使用转换语法,而且更为复杂

输入:

平铺图像:


结果:

# read the input
# resize the tiling image and save to mpr: (in memory) format
# copy the input and tile over it with the resized tiling image
# do the dissolve
# save the output

convert lena.png \
\( tile_water.jpg -resize 50% -write mpr:tile +delete \) \
\( -clone 0 -tile mpr:tile -draw "color 0,0 reset" \) \
-define compose:args=50 -compose dissolve -composite \
lena_tiled.png