Page 1 of 1

Adding copyright text to an image with ImageMagick7

Posted: 2017-01-11T23:54:03-07:00
by sruth
Hi,
I need help in generating copyright text added all over the image at multiple places with Imagemagick 7.

With Imagemagick 6.9 i was able to add copyright text to an image with the below command :
convert -size 240x240 xc:none -fill grey -gravity NorthWest -draw "text 10,10 'Copyright'" -gravity SouthEast -draw "text 5,15 'Copyright'" miff:- | composite -tile - A.jpg ImageMagick6.jpg (Adds copyright text at multiple places.)

But after installing Imagemagick 7 the above command doesn't work. As the composite utility used above is moved to legacy utility.
So instead of using leacacy util i tried using the command as below:
magick convert -size 240x240 -fill grey -gravity NorthWest -draw "text 10,10 'Copyright'" -gravity SouthEast -draw "text 5,15 'Copyright'" A.jpg ImageMagick7.jpg (Adds copyright text only in the NorthWest and SouthEast .)

With the magick command i am unable to use tile and pipeline symbol to repeatedly display the copyright information, as i did in Imagemagick6.

Can you please suggest me an alternative for tile option or usage of tile with the latest Imagemagick 7?

My requirement is to display copyright text all over the image in multiple places with Imagemagick 7. With Image Magick 6 it displays copyright text at multiple places all over the image.

Thank You.

Re: Adding copyright text to an image with ImageMagick7

Posted: 2017-01-12T00:35:40-07:00
by snibgo
You can replace "convert" by "magick convert", and "composite" by "magick composite".

Re: Adding copyright text to an image with ImageMagick7

Posted: 2017-01-12T00:57:17-07:00
by fmw42
try the following:

NOTE: convert is replace by magick and composite is replaced by magick composite in IM 7

Code: Select all

magick -size 240x240 xc:none -fill grey -gravity NorthWest -draw "text 10,10 'Copyright'" -gravity SouthEast -draw "text 5,15 'Copyright'" miff:- | magick composite -tile - A.jpg ImageMagick6.jpg
or (using IM internal image "logo:") in one magick command and mpr (in-memory) image format

Code: Select all

magick \( -size 240x240 xc:none -fill grey \
-gravity NorthWest -draw "text 10,10 'Copyright'" \
-gravity SouthEast -draw "text 5,15 'Copyright'" \
-write mpr:tile +delete \) \
logo: \
\( +clone -fill mpr:tile -alpha on -channel rgba -draw 'color 0,0 reset' \) \
-compose over -composite \
result.jpg

Re: Adding copyright text to an image with ImageMagick7

Posted: 2017-01-12T01:11:37-07:00
by sruth
After replacing "convert" by "magick", and "composite" by "magick composite", the copyright is generated all over the image as expected.

Thank you so much for helping me by providing the information.