batch watermarking?

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
rod

batch watermarking?

Post by rod »

hi, im trying to add a transparent png image to the bottom right corner of a number of images (some 160) but so far i haven't found a way to do them all in one command. is there a way?

if not, does anyone know of some script i could use?

i'm on linux btw, thanks.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: batch watermarking?

Post by Bonzo »

This might work but untested THIS WILL OVERWRIGHT THE ORIGINAL IMAGES and will only work with jpgs.

Code: Select all

mogrify -watermark 30% -gravity Southeast watermark.png  *.jpg
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: batch watermarking?

Post by anthony »

Create a watermark image that is semi-transparent and overlay it...
See "mogrify: in IM Examples Basics.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
rod

Re: batch watermarking?

Post by rod »

thanks mate, i'll look at it and see how it works. so far i got it working with a command i found in some blog:

mogrify -draw 'image Over x,y a,b "path/to/watermark.png"' *.jpg

x: watermark pos x (in pixels, from top-left)
y: watermark pos y (in pixels, from top-left)
a: watermark width
b: watermark height

this, too, overwrites all jpg images.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: batch watermarking?

Post by anthony »

It will not write over all the images if you give it a different -path or a different image -format for the destination image.

See IM Examples for details
http://www.imagemagick.org/Usage/basics/#mogrify
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply