I would like to resize the canvas of my images in %
My batch code and command is:
FOR %%f IN (*.jpg) DO nconvert -canvas 103% 103% -bgcolor 255 255 255 %%f
However, I receive the error: Bad position '255'
Replacing the -bgcolor 255 255 255 code gives an other error.
What am I doing wrong?
Batch canvas resize in %
Moderators: helmut, XnTriq, xnview
Re: Batch canvas resize in %
The command "-canvas" expects the parameters <width> <height> <position>. In your command line width and heigth are specified, but the position (top-left, top-center, ...) is missing.
A sample for a valid command line:
A sample for a valid command line:
Code: Select all
FOR %%f IN (*.jpg) DO nconvert -canvas 103% 103% center -bgcolor 255 255 255 %%f
Re: Batch canvas resize in %
Yes indeed, I forgot to use pos center.
New code:
The code with center now gives the error: Bad position '-bgcolor'
New code:
Code: Select all
FOR %%f IN (*.jpg) DO nconvert -canvas 103% 103% center -bgcolor 255 255 255 %%f
Photographer
Sorry, I haven't tested my above command in a batch script. In a batch script you have to use %% for the percent character:
Code: Select all
FOR %%f IN (*.jpg) DO nconvert -canvas 103%% 103%% center -bgcolor 255 255 255 %%f