Page 1 of 1

Re: Newbie question regarding batch conversion

Posted: 2008-04-25T09:56:51-07:00
by fmw42
The example works fine under UNIX. There are special rules for Windows. See http://www.imagemagick.org/Usage/api/#windows that deal with \ and escape characters.
convert -size 140x80 xc:none -fill grey \
-gravity NorthWest -draw "text 10,10 'Copyright'" \
-gravity SouthEast -draw "text 5,15 'Copyright'" \
miff:- |\
composite -tile - logo.jpg wmark_text_tiled.jpg
This is one command, not a script, but a complex one. The \ at the end of each line are a continuation character. You probably need to remove these and make it all one long line.

The first four lines create a transparent image of size 140x80 and draw gray text in the northwest and southeast corner of that image and output it as miff:- which is an internal temporary image which is then piped to the last line, the composite command which tiles that image (read in as the single -) onto logo.jpg and outputs it as wmark_test_tiled.jpg.

Re: Newbie question regarding batch conversion

Posted: 2008-04-25T14:58:24-07:00
by el_supremo
I've tried that command on WinXP and it works.

Code: Select all

convert -size 140x80 xc:none -fill grey -gravity NorthWest -draw "text 10,10 'Copyright'" -gravity SouthEast -draw "text 5,15 'Copyright'" miff:- | composite -tile - logo.jpg wmark_text_tiled.jpg
I'm using IM V6.3.9.
Which version of ImageMagick are you using?

Pete

Re: Newbie question regarding batch conversion

Posted: 2008-04-26T13:05:26-07:00
by Bonzo
Interesting example; works with php as well.

I presume the miff image is in the memory; does anyone have a link to more detailed info about how it works - How many miff images can you have are they over written etc.? It should be useful with my examples as I will not need the tempory images.

I had a look at the pipe a while ago and could not get it to work but it works OK with this BUT why do I need the - here ? - original.jpg the code fails without it.

Re: Newbie question regarding batch conversion

Posted: 2008-05-20T23:00:32-07:00
by anthony
The - means read from standard input (the pipe)