Re: Apply tiled watermark to multiple images in a single process
Matt Hurne <[email protected]> Thu, 11 Oct 2012 14:56:56 -0400
| Newsgroups | gmane.comp.video.graphicsmagick.tools |
|---|---|
| Message-ID | <CAB2fYyNGVSJSGxGdbzBNqwRDn5T_Q+vfjvhG8h0eL6OEocYC_A@mail.gmail.com> |
On Thu, Oct 11, 2012 at 2:37 PM, Bob Friesenhahn <[email protected]> wrote: > On Thu, 11 Oct 2012, Matt Hurne wrote: >> >> >> 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. > > > Is the largest file size a reasonable known size? If so, you can produce > your tiled image in advance and composite on top of the images to be > watermarked. It is ok if the composite image is larger than the image to be > composited on. Any overlap will be trimmed off. That's a great suggestion and one I think is worth trying out. The primary concern is overal performance/throughput. Typically the longest edge of the largest image is limited to 800 pixels. I could replace my non-tiled watermark image with a tiled version of 800x800 (no need to generate it each time using gm since the maximum size is static), and then use the 'gm mogrify' command previously mentioned to apply it to all of the scaled images. The only ugliness would be having to rename all of the watermarked images and move them into the same directory as the non-watermarked images, unless I can figure out a way to have 'gm mogrify' handle that for me as well! 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