Batch watermark images in subfolders

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
muri
Posts: 15
Joined: 2017-01-17T05:09:01-07:00
Authentication code: 1151

Batch watermark images in subfolders

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Batch watermark images in subfolders

Post 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
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Batch watermark images in subfolders

Post 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.
muri
Posts: 15
Joined: 2017-01-17T05:09:01-07:00
Authentication code: 1151

Re: Batch watermark images in subfolders

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Batch watermark images in subfolders

Post 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/
Post Reply