Re: Apply tiled watermark to multiple images in a single process

Bob Friesenhahn <[email protected]> Thu, 11 Oct 2012 14:18:06 -0500 (CDT)
Newsgroups gmane.comp.video.graphicsmagick.tools
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-477734695-1349983087=:19685
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by blade.simplesystems.org
	id q9BJI6Vg026461

On Thu, 11 Oct 2012, Matt Hurne wrote:
>
> 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!

mogrify does support the -output-directory and -create-directories=20
option.

        -create-directories
               create output directory if required

               Use this option with -output-directory if the input
               paths  contain  subdirectories and it is desired to
               create similar subdirectories in the output  direc=E2=80=90
               tory.   Without  this  option, mogrify will fail if
               the required output directory does not exist.

        -output-directory <directory>
               output files to directory

               Use  -output-directory to specify a directory under
               which to write the output files.  Normally  mogrify
               overwrites the input files but with this option the
               output files may be written to a  different  direc=E2=80=90
               tory  so  that  the  input files are preserved. The
               algorithm used preserves  all  of  the  input  path
               specification  in the output path so that the user-
               specified input path (including any directory part)
               is  appended  to  the  output  path.   The  user is
               responsible for creating the output directory.

These options support creating a sort of parallel/mirror of the input=20
files to output files without modifying the input files.  There is no=20
provision for deleting the input files once they have been consumed=20
except for the undocumented tmp: filename prefix specification which=20
will cause the input file to be treated like a temporary file and=20
deleted after it is read (dangerous!).

Assuming that your GM is new enough, mogrify does support a -compose=20
operator and it seems to support -tile as well so maybe you can use=20
-tile similar to what you are using in composite.

Bob
--=20
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen=
/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-477734695-1349983087=:19685
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
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
---559023410-477734695-1349983087=:19685
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-tools mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-tools

---559023410-477734695-1349983087=:19685--