As a web developer, I have come acroos this problem working with galleries, where your client gives you 4MB sized photos from his high res SLR camera and they just wont do. So, how to resize many photos all at once…well, here is a solution I like, and what I love mose about this solution is that it uses a FREE open-source cross-platform application called XnView! So, here goes. Please visit XnView.com for installation instructions for your platform.
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.
- Start by opening XnView and navigating to the folder containing the images you want to resize.
- 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.
- Go to Tools > Batch processing…
- 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.
- 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.
- 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.
- Click the "Transformations" tab at the top of the dialog box.
- 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.
- 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.
- Check the "Keep Ratio" box to prevent your image proportions from being distorted. Recommended for most situations.
- 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).