Resize to a standard canvas size

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

Moderators: helmut, XnTriq, xnview

Post Reply
spud

Resize to a standard canvas size

Post by spud »

Hi everyone,

I need some help on the following:
1. Resize (larger to smaller only) all my photos to 800x600
2. If a photo is smaller than 800x600 it needs to be centered on a canvas of 800x600 (ideally with a standard background color).

Please help me do this!?!?!

I'm new to nconvert, and the options blow me away!

Cheers
spud
User avatar
xnview
Author of XnView
Posts: 46391
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Resize to a standard canvas size help!

Post by xnview »

spud wrote:I need some help on the following:
1. Resize (larger to smaller only) all my photos to 800x600
2. If a photo is smaller than 800x600 it needs to be centered on a canvas of 800x600 (ideally with a standard background color).
Please help me do this!?!?!
I'm new to nconvert, and the options blow me away!
You can only resize canvas for all photos
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Resize to a standard canvas size

Post by helmut »

I need some help on the following:
1. Resize (larger to smaller only) all my photos to 800x600
2. If a photo is smaller than 800x600 it needs to be centered on a canvas of 800x600 (ideally with a standard background color).
XnView can export scripts to NConvert, so you should first try with XnView and then make your batch script.

What you have to do to achieve the wanted result is two operations:
First resize your images and then resize the canvas of all images.

With the following steps, this should work:

1. In XnView browser select the images you want to resize.
2. Select menu "Tools > Convert" to open the dialog for Batch conversion.
3. The interesting bit is the button "Advanced Operations" in the dialog.
- First operation -
4a. In the "Advanced Operations", you select process "Resize" and then move it to the list of process that you want to apply using the button "-->".
4b. Specify the Resize parameters you want: 800 x 600, Keep ratio, Decrease only.
- Second operation -
5a. Then you select process "Resize Canvas" and again press "-->".
5b. Specify the Resize Canvas parameters you want: 800x600, center.
6. Close the dialog "Advanced operations" with "OK" button.
7. Specify desired output directory and format.
8. Press "OK" to run the batch conversion. XnView will convert the files, now.
9. Do not close the dialog "Convert...".
10. Check the converted images (e.g. with a second instance of XnView)
11. If needed, make changes to the conversion. If everything is o.k. you export the script for NConvert using button "Export Batch for NConvert".

Now you can have a look at the script and make it more flexible using Batch variables.
Post Reply