Creating Uniform Images

From OSF Wiki
Jump to: navigation, search

Frequently it is important to create a uniform set of images, either by dimension, aspect, background color, or file format. This article describes a useful open source tool, FastStone Photo Resizer, for achieving such uniformity. FastStone Photo Resizer is an image converter and renaming tool that enables users to convert, rename, resize, crop, rotate, change color depth, add text and watermarks to images in a quick and easy batch mode. Drag and Drop mouse operation is well supported.

Note: Also see the accompanying article on Image Datasets for instructions on how to create uniform thumbnails (though FastStone can be used for this purpose as well).

Overview

Upon downloading and installing FastStone, the application appears as shown in the image below:

Faststone main.png

The operation of the system is based around directories, with the source and target directories shown in the two upper panes. Drag-and-drop or the use of the mid-pane buttons work to move files from the source to target.

Tip: Many of the operations with FastStone involve multiple steps. It is useful to devise a subdirectory naming convention such that each step is migrated to a new directory (such as MyImagesStep1, MyImagesStep2, etc.). By following this approach it is easy to rollback to a previous step in the conversion process if an error or undesired result is obtained.

To the lower right of the main app one sets the target directories and other advanced options. It is via these options (see next) that the various conversion options in the application may be invoked.

The lower highlight shows the various image file input formats that may be processed by the application.

Supported Files

One of the advanced options supported is to convert input image files to one of these output file formats:

Faststone files.png

It is thus possible to take a directory of mixed image types and convert them all to the same format. You can also use this approach to give consistent extension names (such as *.jpg used uniformly over *.jpeg or *.JPG).

Advanced Options

The real power of the FastStone application arises from its Advanced Options, invoked via the lower right button as shown on the first image above.

When invoked, the popup that appears presents a number of conversion options via its tabbed structure. Note that each active option is marked with a green "active" icon.

Each tab on this popup, when first clicked, shows the option as inactive. By checking the upper left option on each pane, that option now becomes active, the tab is marked with the green icon, and the specific settings and controls for that option now appear on the pane. The major options available are Resize, Rotate, Crop, Canvas, Color Depth, Adjustments, DPI, Text, Watermark and Border. We look at three of the common ones below.

Resize

The Resize option allows individual dimensions to be resized, including maintaining the original image aspect (as well as other options):

Faststone advanced resize.png
Tip: First resizing one dimension to a maximum (by setting the alternative direction quite large) while maintaining the aspect, and then doing the same for the other dimension, enables you to re-size images to a combined maximum width and height. This approach is useful when it is desirable to present images of variable aspect ratios within a uniform display window.

Canvas

The Canvas option allows the images to be placed against a fixed size background, with a background color and other options of your determination:

Faststone advanced canvas.png

Borders

Via the Border option, it is possible to add borders of various thicknesses and colors, including a useful shadow effect:

Faststone advanced border.png

Others

The other processing options available are:

  • Rotate - rotate the images
  • Crop - crop the image to a uniform size, with or without maintaining aspect or starting at a specific X-Y coordinate
  • Color Depth - change the number of colors used, which is one way to reduce image size or to obtain gray scales
  • Adjustments - adjust brightness, gamma, saturation and other color aspects
  • DPI - independently set the dots per inch (DPI) for the X and Y aspects
  • Text - add text of specified font, transparency, color, location and size, including the use of variables
  • Watermark - add a watermark image of varied opacity and location.