1. Computing

Discuss in my forum

How to Resize a Batch of Images with XnView

Use Batch Processing to Resize Multiple Images with XnView

By

XnView Resize Parameters

XnView Resize Parameters

Many times you may need to resize multiple image files to a common size, either for uploading to a web site, sending to another device with a small screen, or for some other purpose. This is a quick task using the batch processing tools in the free XnView image viewer, but the way this function works may not be obvious. And frankly, some of the options are undocumented and may be confusing to you.

This tutorial will walk you through how to resize multiple images using the batch processing tool of XnView, explaining which options are important, and also tell you how you can create a script for repetitive resizing operations. With this introduction to the batch processing functions in XnView, you will be better prepared to explore more of the batch transformations you can do with the powerful, free image viewer XnView.

  1. Start by opening XnView and navigating to the folder containing the images you want to resize.

  2. Make a selection of the images you wish to resize. You can select multiple images by Ctrl-clicking on each one you want to include.

  3. Go to Tools > Batch processing…

  4. The batch processing dialog box will open and the Input section will show a list of all the files you have selected. If desired, use the add and remove buttons to include more images or remove any that you did not intend to include.

  5. In the Output section:
    • If you want XnView to automatically rename the resized images by appending a sequential number to the original filename, simply check the "Use original path" box and set Overwrite to "Rename."

    • If you want XnView to generate a subfolder for the resized files, uncheck the "use original path box, and type "$/resized/" in the directory field. The file name will remain the same.

    • If you want to append a custom text string to the original file name, uncheck the "use original path box, and type "%yourtext" in the directory field. Whatever you type after the % sign, will be appended to the original file name and the new files will use the same folder as the originals.

  6. If you don't need to convert the files, check the box for "Keep source format." Otherwise, uncheck the box, and choose the output format from the Format menu.

  7. Click the "Transformations" tab at the top of the dialog box.

  8. Expand the "Image" section of the tree and locate "resize" in the list. Double click "resize" to add it to the list of transformations which will be applied to the processed images.

  9. The resize parameters will appear below the list. You will need to set the desired Width and Height for the processed images, either in pixel dimensions, or as a percentage of the original size. Clicking the >> button, will produce a menu with some common image sizes.

  10. Check the "Keep Ratio" box to prevent your image proportions from being distorted. Recommended for most situations.

Other options:

  • Fit Over - Checking the "Fit over" box will cause XnView to change the smallest size to what you have specified, and the other dimension will be whatever it needs to be to maintain the ratio. That means it may be larger than your specified dimensions in one direction. Use this when only the image width OR height matters.

  • Follow orientation - This option is undocumented, and I have not been able to make sense of it. Recommendation is to leave default, unless you get unexpected rotation, and then try reversing the option.

  • Only Decrease/Increase - With decrease checked, images smaller than your specified dimensions will not be made larger. With increase checked, images larger than your specified dimensions will not be made smaller.

  • Resample - Specify the interpolation algorithm used for adding and deleting pixels. Lanczos is the default and gives high quality results. Recommendation is to leave Lanczos unless you have a reason for using another method.

  • Script - This is useful when you often need to use the same settings for a batch operation. Check the box and press "save" to keep your settings in a file that you can re-load later. To re-load a previously saved settings file, choose it from the menu, or press "Load" to open a script file from a folder. The "Export" button allows you to save it as a Windows script (.bat or .cmd file).

©2014 About.com. All rights reserved.