How to crop image and add watermark?

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
butik
Posts: 1
Joined: Fri Jan 03, 2014 9:55 pm

How to crop image and add watermark?

Post by butik »

Hello!

Prompt command to perform this task:
1. All the images in a subfolder on the bottom cut 150px
2. Overwrite the original and keep the original name.
* Pictures are located on disk c:/images/.. there subfolders ../2/ ../3/ ../4/ etc
3. At the top right of each picture write letters transparent (50% opacity), the word "AutoSale"

Can this run at .bat or .cmd file?

Thank you :)
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How to crop image and add watermark?

Post by cday »

butik wrote:1 ... bottom cut 150px
The crop function will do that, I think.
butik wrote:2. Overwrite the original and keep the original name.
Yes.
butik wrote:3. At the top right of each picture write letters transparent (50% opacity), the word "AutoSale"
Yes, except that I don't see transparency support listed although it's included in XnView and so might be easily added.
butik wrote:Pictures are located on disk c:/images/.. there subfolders ../2/ ../3/ ../4/ etc
NConvert doesn't support recursion but that should be possible using Windows cmd.exe ('DOS') FOR function, I think.
butik wrote:Can this run at .bat or .cmd file?
A .bat file yes. I've no personal experience of .cmd files but it may be possible.

If you're used to working at the command line you can view the NConvert command line options in the Help file in this zip:
NConvert 6.51 Help.zip
(10.16 KiB) Downloaded 202 times
Another option would be to use one of the GUI programs XnView, XnView MP or XnConvert with a script containing the batch conversion setting required that can be exported and then reloaded quickly later.

Edit:

I don't see support for transparency for text in the GUI programs in batch mode, only when directly applied to an image in XnView.

Adding text with transparency as a watermark image in the GUI programs is supported in batch mode, but again isn't listed in the NConvert command line options.
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How to crop image and add watermark?

Post by cday »

I think you can do this easily using the GUI program XnConvert -- update v1.60 just released -- if you are still looking for a solution.

You can set up the required actions once, and then save them to an xbs script which can be reloaded quickly later -- it's also cross-platform if you're not using Windows.

It should also be much easier than creating a working NConvert script, although I don't think NConvert supports all the required actions anyway.

cday.
Post Reply