On Wednesday, October 18, 2006 12:07 pm, Hugemann wrote: > Hi, > > I'm brand new on this list (but not quite so new to > ImageMagick). > > I would like to watermark a bulk of images with a logo placed > at their right bottom. I have this logo as a vector graphic. > > The problem is that the JPEGs I want to watermark are of > various size, thus I would like to scale my vector graphic > according to the height of the target image, scaling it for > instance to 20% of the target image's height. > > Any ideas how this could be done? > > I don't need to do it with a single command, I could possibly > use a batch language. (Preferably VBS as I am working on a > Windows machine.)
Assuming you are using the command-line ImageMagick utilities with whatever scripting language you want, you would first need to know the size of the target image, and probably what side of the image is longest, the height or the width. Capture the output of the identify command in a variable. height = `identify -format '%h' target.jpg` width = `identify -format '%w' target.jpg` Then use whichever is greater (or smaller, depending on which side you want to use) to scale the coresponding side of your watermark image. You should be able to use -gravity with composite to position it in the lower right corner. -- Scott _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
