Adding copyright text to an image with ImageMagick7

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sruth
Posts: 2
Joined: 2017-01-11T23:19:24-07:00
Authentication code: 1151

Adding copyright text to an image with ImageMagick7

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Adding copyright text to an image with ImageMagick7

Post by snibgo »

You can replace "convert" by "magick convert", and "composite" by "magick composite".
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Adding copyright text to an image with ImageMagick7

Post 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
sruth
Posts: 2
Joined: 2017-01-11T23:19:24-07:00
Authentication code: 1151

Re: Adding copyright text to an image with ImageMagick7

Post 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.
Post Reply