Apply tiled watermark to multiple images in a single process
Matt Hurne <[email protected]> Thu, 11 Oct 2012 13:13:03 -0400
| Newsgroups | gmane.comp.video.graphicsmagick.tools |
|---|---|
| Message-ID | <CAB2fYyMCint2_nJeQgXx5-Hr-PbwFW8_WAWcnynBXH-VvB2WsA@mail.gmail.com> |
I've scoured the web for a solution to the following problem, without success: I would like to execute a single gm process to apply a tiled watermark image to multiple images (which are the same image at various scales). Currently, I execute one process per image, using commands like: gm composite -tile watermark.png ORIG_MAX_400.jpg WM_MAX_400.jpg gm composite -tile watermark.png ORIG_MAX_200.jpg WM_MAX_200.jpg etc. I've tried a plethora of commands in an attempt to achieve the same result as the above commands in a single command, including variations of gm mogrify, gm convert, and gm composite. The closest I've come was when using the following command: gm mogrify -output-directory out -create-directories -draw "image over 0,0 0,0 watermark.png" ORIG_MAX_*.jpg In the case of that command, I end up with a watermarked version of each of the input images, but the watermark isn't tiled. Is there a way to achieve this? I considered issuing one gm composite to watermark the original unscaled image and then a second command to end up with all the scaled versions (that's how I get the non-watermarked scaled images), but that will result in the watermark itself being scaled in addition to the image, which isn't what I want. My ultimate goal is to execute as few processes as possible; if it can be done with more than one process but less than one per scaled image, that will probably be sufficient for my needs. Thanks! Matt Hurne ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev