Page 1 of 1

Batch watermark problem

Posted: 2010-04-26T08:52:15-07:00
by acrocephalus
Hello!
I'm trying to batch watermark a full directory of jpg images using this code:

Code: Select all

composite -gravity SouthEast -geometry +10+10 stamp.png *.jpg
but it does not work. In fact, it replaces the last image with the first (which it is watermarked!) Any idea on how to solve it?
Cheers!

Dani

Re: Batch watermark problem

Posted: 2010-04-26T10:29:56-07:00
by fmw42
Convert and composite do not allow working on a directory of images. see mogrify. But I am not sure mogrify will allow the composite. If not, then you likely will need to write a script to loop over your images.

Re: Batch watermark problem

Posted: 2010-04-26T13:21:36-07:00
by el_supremo
If you're using Windows, you can use this statement in a DOS window to process all JPG in a directory:

Code: Select all

for %F in (*.jpg) do composite -gravity SouthEast -geometry +10+10 stamp.png %F %F
If you want to do this in a batch file you must double the percent signs:

Code: Select all

for %%F in (*.jpg) do composite -gravity SouthEast -geometry +10+10 stamp.png %%F %%F
Pete