Page 1 of 1

Batch watermark images in subfolders

Posted: 2017-02-19T12:52:34-07:00
by muri
Hello,
I want to add pictures in subfolders with a watermark.
For this I have a transparent PNG graphic.

I tried to add a watermark to a single image, but I failed.
I've been looking for solutions, but none has worked for me.
To a batch processing method I have not come yet.

The original pictures should not be changed any further.
The original pictures are in landscape and portrait, but also a few in other formats.
Top left would probably be the best.

Version: ImageMagick 6.7.2-7 2016-06-16 Q16
Linux: 2.6.32-642.6.2.el6.x86_64

Re: Batch watermark images in subfolders

Posted: 2017-02-19T13:04:53-07:00
by snibgo
muri wrote:Version: ImageMagick 6.7.2-7
That is very very old. I suggest you upgrade.

Some watermarking methods are shown at http://www.imagemagick.org/Usage/compose/#watermark

Re: Batch watermark images in subfolders

Posted: 2017-02-19T14:01:13-07:00
by fmw42
I would agree with user snibgo. You IM version is about 250 versions old. Upgrade if you can.

Once you work out how to do it in convert, you can then use the same watermark to watermark all images in a directory using mogrify. See
http://www.imagemagick.org/Usage/basics/#mogrify
http://www.imagemagick.org/Usage/basics ... fy_compose

If you upload a background image and your watermark image to some free hosting service (such as dropbox.com) and put the URLs here, we can probably give you the code. If you have an example of what you want for the output, then provide that also.

Please also identify your platform/OS, since syntax may vary.

Re: Batch watermark images in subfolders

Posted: 2017-02-19T16:00:42-07:00
by muri
OK, I can install a newer version in my shared webhost. This possibility exists. I have already done in another account.

The things in the linked sides I have tried. I did not make it. Somehow I do not get that. Also, I need a batch.

So, there are many many * .JPG in many subfolders. All these pictures should get a watermark, this one from the transparent * .PNG graphic. The images with the watermark should be in a new folder with the same subfolder structure.

With Irfanview and batch mode, this works perfectly, but I need it on the server with imagemagick.

This worked perfectly, also modified. OK, without subfolder. But with the watermark I can not go.
https://www.imagemagick.org/discourse-s ... =1&t=31246

Re: Batch watermark images in subfolders

Posted: 2017-02-19T18:15:58-07:00
by fmw42
First thing is you did not identify your platform for your server nor what IM version is there. Second IM does not create new folders. So you will need to do that in your OS. Third you did not post an example of what you want nor an input image and watermark image. So we do not know exactly what you are trying to do.

It would appear that you will likely need to use mogrify folder by folder or write a custom script to process all the images you want. That will depend upon whether your server is Unix or Windows.

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

For novices, see

viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/