Page 1 of 1

batch watermarking?

Posted: 2007-08-22T11:57:37-07:00
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.

Re: batch watermarking?

Posted: 2007-08-22T12:26:54-07:00
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

Re: batch watermarking?

Posted: 2007-08-22T21:53:18-07:00
by anthony
Create a watermark image that is semi-transparent and overlay it...
See "mogrify: in IM Examples Basics.

Re: batch watermarking?

Posted: 2007-08-22T22:05:11-07:00
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.

Re: batch watermarking?

Posted: 2007-08-22T23:24:21-07:00
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