如何使用imagemagick创建类似shutterstock的水印
我想创建像Shutterstock一样的图像水印。我已经尝试过了,但无法复制它。我试着用下面的命令。问题是我不能像Shutterstock那样在图像中添加对角线随机文本。我尝试了很多选择,但都没有成功如何使用imagemagick创建类似shutterstock的水印,imagemagick,imagemagick-convert,Imagemagick,Imagemagick Convert,我想创建像Shutterstock一样的图像水印。我已经尝试过了,但无法复制它。我试着用下面的命令。问题是我不能像Shutterstock那样在图像中添加对角线随机文本。我尝试了很多选择,但都没有成功 infile="zoom.jpg" ww=$(convert -ping "$infile" -format "%[fx:w-1]" info:) hh=$(convert -ping "$infile" -format "%[fx:h-1]" info:) convert "$infile" \
infile="zoom.jpg"
ww=$(convert -ping "$infile" -format "%[fx:w-1]" info:)
hh=$(convert -ping "$infile" -format "%[fx:h-1]" info:)
convert "$infile" \
-fill "graya(100%,0.75)" \
-draw "line 0,0 $ww,$hh line $ww,0 0,$hh" -alpha off \
-fill "graya(50%,0.25)" \
tile_aqua_500_text_x_text.jpg
composite -dissolve 35 -gravity center logo.png tile_aqua_500_text_x_text.jpg tile_aqua_500_text_x_text.jpg
convert -background none -size 220x320 xc:none -font DejaVu-Sans-Bold -pointsize 30 \
-gravity North -draw "rotate -22 fill grey text 20,10 'knot9'" \
-gravity West -draw "rotate -27 fill grey text 5,15 '89898989'" \
miff:- |\
composite -dissolve 70 -tile - tile_aqua_500_text_x_text.jpg tile_aqua_500_text_x_text.jpg
width=`identify -format %w tile_aqua_500_text_x_text.jpg`; \
convert -background '#0008' -fill white -gravity center -size ${width}x30 -pointsize 10 -font DejaVu-Sans-Bold\
caption:"\nThis image is Copyrighted by Knot9 \n www.knot9.com | Image Id: 89898989\n" \
tile_aqua_500_text_x_text.jpg +swap -gravity south -composite tile_aqua_500_text_x_text.jpg
我的输出是
要求是
在ImageMagick中,您可以执行以下操作。使用标签在透明背景上创建一个小文本图像:。旋转它。填充它以控制间距。平铺以填充图像。然后在背景图像上合成平铺图像 图片:
如果使用ImageMagick 7,则将转换为magick
有关平铺的信息,请参见。我收到一条警告
转换:几何体不包含图像“水印”@warning/attribute.c/GetImageBoundingBox/519。
您的IM版本和平台/操作系统是什么?你正确使用我的命令了吗?你的确切命令是什么?您是否像在我的命令中一样在每个\之后保留新行?如果您在Windows上,则语法略有不同。
convert lena.png \
\( -size 100x -background none -fill white -gravity center \
label:"watermark" -trim -rotate -30 \
-bordercolor none -border 10 \
-write mpr:wm +delete \
+clone -fill mpr:wm -draw 'color 0,0 reset' \) \
-compose over -composite \
lena_watermark.png