如何使用Imagemagick在shutterstock.com中创建受版权保护的图像等文本效果?

如何使用Imagemagick在shutterstock.com中创建受版权保护的图像等文本效果?,imagemagick,imagemagick-convert,Imagemagick,Imagemagick Convert,在搜索谷歌时,我们看到很多带有文本覆盖效果的图片,声称这些图片来自shutterstock.com 此文本效果类似于以下内容: 我想知道如何使用ImageMagick cli执行类似操作 非常感谢您的帮助。理想情况下,您可以创建一个带有文本效果的水印掩码,并在源图像上合成 步骤1:创建文本效果以便重复使用 convert -pointsize 64 -font GeorgiaB \ -fill black -stroke white -strokewidth 2 \

在搜索谷歌时,我们看到很多带有文本覆盖效果的图片,声称这些图片来自shutterstock.com

此文本效果类似于以下内容:

我想知道如何使用ImageMagick cli执行类似操作


非常感谢您的帮助。

理想情况下,您可以创建一个带有文本效果的水印掩码,并在源图像上合成

步骤1:创建文本效果以便重复使用

convert -pointsize 64 -font GeorgiaB \
        -fill black -stroke white -strokewidth 2 \
        -background transparent -channel A -evaluate subtract 75% \
        caption:"Hello World" mask.png

步骤2:合成文本效果覆盖其他图像

convert -size 500x400 plasma: mask.png \
        -gravity center -compose ATop  -composite output.png


还有更多的文本处理和效果示例,以及@上的合成技术。

理想情况下,您可以使用文本效果创建水印掩码,并在源图像上合成

步骤1:创建文本效果以便重复使用

convert -pointsize 64 -font GeorgiaB \
        -fill black -stroke white -strokewidth 2 \
        -background transparent -channel A -evaluate subtract 75% \
        caption:"Hello World" mask.png

步骤2:合成文本效果覆盖其他图像

convert -size 500x400 plasma: mask.png \
        -gravity center -compose ATop  -composite output.png


还有更多的文本处理和效果的例子,以及@上的合成技术。

这里有一种替代方法,可以使用Imagemagick-annotate直接在图像上绘制文本,这是来自
emcconville
的优秀方法。我从一个小的可耕地图像开始,放大到500x500大小,然后用50%透明度的中灰色和50%透明的白色轮廓绘制文本。您可以根据需要更改灰度和透明度以及字体和品脱大小。更改+0+0以相对于重心移动文本的位置。将-gravity更改为其他指南针位置,以相对于这些位置绘制文本

convert -size 500x500 tile:tile_aqua.jpg \
-fill "graya(50%,0.5)" -strokewidth 1 -stroke "graya(100%,0.5)" \
-gravity center -font arial -pointsize 64 \
-annotate +0+0 "Hello World" result.jpg


这里有一种替代方法,可以使用Imagemagick-annotate直接在图像上绘制文本,这是
emcconville
中的优秀方法。我从一个小的可耕地图像开始,放大到500x500大小,然后用50%透明度的中灰色和50%透明的白色轮廓绘制文本。您可以根据需要更改灰度和透明度以及字体和品脱大小。更改+0+0以相对于重心移动文本的位置。将-gravity更改为其他指南针位置,以相对于这些位置绘制文本

convert -size 500x500 tile:tile_aqua.jpg \
-fill "graya(50%,0.5)" -strokewidth 1 -stroke "graya(100%,0.5)" \
-gravity center -font arial -pointsize 64 \
-annotate +0+0 "Hello World" result.jpg

嗨,fmw42,谢谢:)我怎样才能添加一个像shutterstock.com这样的大X

在角之间画两条对角线

输入(tile_aqua_500.jpg):

在Imagemagick 6 Unix系统中:

infile="tile_aqua_500.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)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
infile="tile_aqua_500.jpg"
magick "$infile" \
-fill "graya(100%,0.75)" \
-draw "line 0,0 %[fx:w-1],%[fx:h-1] line %[fx:w-1],0 0,%[fx:h-1]" -alpha off \
-fill "graya(50%,0.25)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
在Imagemagick 7 Unix系统中:

infile="tile_aqua_500.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)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
infile="tile_aqua_500.jpg"
magick "$infile" \
-fill "graya(100%,0.75)" \
-draw "line 0,0 %[fx:w-1],%[fx:h-1] line %[fx:w-1],0 0,%[fx:h-1]" -alpha off \
-fill "graya(50%,0.25)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
任一命令的结果:

嗨,fmw42,谢谢:)我怎样才能添加一个像shutterstock.com这样的大X

在角之间画两条对角线

输入(tile_aqua_500.jpg):

在Imagemagick 6 Unix系统中:

infile="tile_aqua_500.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)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
infile="tile_aqua_500.jpg"
magick "$infile" \
-fill "graya(100%,0.75)" \
-draw "line 0,0 %[fx:w-1],%[fx:h-1] line %[fx:w-1],0 0,%[fx:h-1]" -alpha off \
-fill "graya(50%,0.25)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
在Imagemagick 7 Unix系统中:

infile="tile_aqua_500.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)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
infile="tile_aqua_500.jpg"
magick "$infile" \
-fill "graya(100%,0.75)" \
-draw "line 0,0 %[fx:w-1],%[fx:h-1] line %[fx:w-1],0 0,%[fx:h-1]" -alpha off \
-fill "graya(50%,0.25)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" tile_aqua_500_text_x.jpg
任一命令的结果:


有很多方法可以在底部添加一个带有文本的白色区域。这是一个。如果这不是你想要的,那么请进一步解释

infile="tile_aqua_500.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)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" \
-undercolor white -gravity southeast -pointsize 24 \
-fill black -annotate +10+10 "yourdomain.com" \
tile_aqua_500_text_x_text.jpg

有很多方法可以在底部添加一个带有文本的白色区域。这是一个。如果这不是你想要的,那么请进一步解释

infile="tile_aqua_500.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)" \
-strokewidth 1 -stroke "graya(100%,0.25)" \
-gravity center -font arial -pointsize 48 \
-annotate +0+0 "Hello World" \
-undercolor white -gravity southeast -pointsize 24 \
-fill black -annotate +10+10 "yourdomain.com" \
tile_aqua_500_text_x_text.jpg

我需要添加类似的效果来保护我们的图纸,因为我们的图纸被盗,他们在谷歌图片中的搜索排名很好,但没有链接到我们的网站。Shutterstock效果很好,因为1。它可以保护不同颜色样式(浅或深)的图形,并且它有一个大X来保护整个图片。2.当你必须把很多画放在一起的时候,这不会让它们看起来很难看。那么,如何制作大X呢?我需要添加类似的效果来保护我们的图纸,因为我们的图纸被盗了,他们在谷歌图片中的搜索排名很好,但没有链接到我们的网站。Shutterstock效果很好,因为1。它可以保护不同颜色样式(浅或深)的图形,并且它有一个大X来保护整个图片。2.当你必须把很多画放在一起的时候,这不会让它们看起来很难看。那么,如何制作大X?嗨,emcconville,谢谢:)我怎样才能添加像shutterstock.com这样的大X?嗨,emcconville,谢谢:)我怎样才能添加像shutterstock.com这样的大X?嗨,fmw42,谢谢:)我怎样才能添加像shutterstock.com这样的大X?嗨,fmw42,谢谢,我已经使用您的cli完成了编码。我想知道如何添加带有文本的底部白色区域以包括shutterstock.com之类的网站地址?是否要在图像绑定内添加白色区域或附加到图像底部?您好fmw42,我要在图像绑定内添加白色区域(因为数据库中存储的所有我的图形都有宽度和高度,更改它们将导致潜在的错误)您好,fmw42,谢谢,我已经使用您的cli完成了编码。我想知道如何添加带有文本的底部白色区域,以包括shutterstock.com之类的网站地址?是否要在图像绑定或附加到图像底部的图像中添加白色区域?您好,fmw42,我要在图像绑定中添加白色区域(因为我存储在数据库中的所有图纸都有宽度和高度,改变它们会导致潜在的错误)如果我的答案有帮助,请考虑给他们一个UP。如果我的答案有所帮助,请考虑给他们一个投票。