Batch add mask based on filename.

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Post Reply
Icos
Posts: 3
Joined: Sun Oct 01, 2017 11:21 pm

Batch add mask based on filename.

Post by Icos »

Hello guys!
I have a bunch of pictures and their alpha images.
They are named like this: picture.png and picture_alpha.png.

I need to batch combine the image and it's aplha mask into one file. It works just fine by using "Add mask" action, but the problem is, i can't use a wildcard as the name of the mask in the XnConvert to use the different masks for each file. What i'd like to do is to input the {Filename}_alpha.png in the mask name field. Is it possible?

Or maybe there is another way to do it? Via command line batch file or something like this?
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Batch add mask based on filename.

Post by xnview »

sorry but it's not possible
Pierre.
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch add mask based on filename.

Post by cday »

xnview wrote:sorry but it's not possible
Icos wrote:Or maybe there is another way to do it? Via command line batch file or something like this?
I think it should be possible using a batch file, but I don't have the experience to try it in the time available... :(

You could try posting the question on one of the programing forums...
Icos
Posts: 3
Joined: Sun Oct 01, 2017 11:21 pm

Re: Batch add mask based on filename.

Post by Icos »

Thanks for the answers guys. Looks like i'll have to resort the imagemagick + bat file to do this.
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch add mask based on filename.

Post by cday »

Icos wrote:Looks like i'll have to resort the imagemagick + bat file to do this.
Or NConvert + bat file, I didn't mention the XnView command line utility explicitly, unless you prefer imagemagick... :wink:

Edit:

Looks as if Add mask hasn't been added to NConvert yet, as of 7.00... :(
Icos
Posts: 3
Joined: Sun Oct 01, 2017 11:21 pm

Re: Batch add mask based on filename.

Post by Icos »

cday wrote:
Icos wrote:Looks like i'll have to resort the imagemagick + bat file to do this.
Or NConvert + bat file, I didn't mention the XnView command line utility explicitly, unless you prefer imagemagick... :wink:

Edit:

Looks as if Add mask hasn't been added to NConvert yet, as of 7.00... :(
Yeah, i've looked at nconvert first, but it doesn't support Add mask yet, unfortunately.
Post Reply