Hi everyone,
I am brand new to this forum, so thanks in advance for and help I really appreciate it!
So anyways I have about 1000 images in a folder called "Photos Compressed". The folders are numbers as follows "001, 002, etc." Each folder has 8-10 images in it. These image are 2400w x 1600h in dimension. I have a watermark that I created in Photoshop which I then saved as a PNG that is the same size (2400 x 1600).
I need to add the watermark to all of the photos using ImageMagick. I wanted them to go into a new folder called "Photos Watermarked". These new images need to maintain the folder structure of the old folder "Photos Compressed" with all subfolders etc. These new photos also will be scaled down to 640h x 480w.
I basically want the .png watermark to overlay each new image in the new folder keeping the folder structure.
How would I go about this? I am unfamiliar with ImageMagick and I have access to both a Mac and a PC. I tried using Photoshop's image processor but it takes forever and it is not working properly. Any help would be greatly, greatly appreciated.
Thanks!
Tom
Need help with watermarking in Imagemagick
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Need help watermarking images in Image Magick!
Do you know how to write scripts on either machine? Pick the one you are most familiar with.
Perhaps you have the 640x480 dimensions the wrong way round.
I would start by working out the command that works on a single image. It might be something like:
When that does what you want, you could put that in a two nested loops: the outer one loops through directories, the inner one loops through images in the directory. Instead of the inner one, you could use mogrify. (I wouldn't, simply because I rarely do this kind of work, and don't mind the performance penalty of running "convert" on every image.)
Perhaps you have the 640x480 dimensions the wrong way round.
I would start by working out the command that works on a single image. It might be something like:
Code: Select all
convert in.tiff watermark.png -composite -resize 640x480 out.tiff
snibgo's IM pages: im.snibgo.com
Re: Need help watermarking images in Image Magick!
I think mogrify reads all the images in before the conversion starts which could result in a memory problem? I suppose you could send the images to mogrify in batch's but I would use convert as well.Instead of the inner one, you could use mogrify.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Need help watermarking images in Image Magick!
Could be. If there are only 10 images per directory, at 8 bytes/pixel, this is 307MB, which probably isn't a problem.Bonzo wrote:I think mogrify reads all the images in before the conversion starts which could result in a memory problem?
snibgo's IM pages: im.snibgo.com
Re: Need help watermarking images in Image Magick!
thanks guys! I am more familiar with Windows command line. I used FFmpeg before to convert videos.