Batch Convert Several Icons

This option is only available when you select two or more icons in the Main Viewer list: it allows you to export all of the selected icons to the format you want. You can of course select all icons in your icon library (use Edition|Select All or press CTRL+A) and export the whole library to different formats.
Finally you can optionally set a filter for icon images, so only the icon images you want will be exported.

Once your selection is done,

About selecting the destination format

A popup menu will list all destination formats available. GConvert natively supports exporting icon images to icon files (.ico), bitmaps (.bmp), Portable Network Graphic files (.png) and finally Adobe Photoshop (.psd) files. Thanks to plug-ins, this list can be widely extended (with GIF, JPG support, etc...).

All you have to do is to select the destination format you wish and then the following window will appear:

First of all, you have to determine the destination folder for the output files. You can select an existing folder using the Browse button or directly enter a custom path in the field. Note that if the path does not exist, it will be created.

Secondly you can filter what kind of icon images you want to export. By default GConvert will export all icon images: it means that for each icon selected in the Main Viewer, GConvert will convert all of the icon images to the selected format.
If you do not want to export all icon images, then you have to specify which icon images you want to export. This is done thanks to the list "Width-Height-Bpp" (there are three columns listing width, height and pixel format (in number of bits, from 1 bit to 32 bits) of images). To add a new icon image specification to the list, press the Add button and you will be prompted for entering the size & pixel format for the new icon image. To remove an existing format in the list, highlight it and then press Remove.
Note that GConvert will always add the format specification of the current icon image selected in the Image Viewer when you pressed Save.

Special feature for icon output format: if you selected "icon" as the destination format, a new option called "Each image in a separate icon file" will be displayed. This option lets you save one icon image per icon file. If this option is not enabled, GConvert will create one icon file per icon resource, i.e. each icon file will contain all of the icon images.

About the three buttons

  1. Background Color: lets you set the background color for the conversion. Transparent icon areas will be actually filled with the background color (for formats which do not support transparency like bitmaps).
  2. Options: lets you set additional options for the conversion, similar to the ones you find in the Saving single icons help topic. It can display a shell save dialog box but only the export options on the right panel will count (ignore the other parameters).
  3. Set Filenames: opens the "environment options" window to let you define the mask for output filenames. See further information below.

Note that if output files already exist, they will be automatically overwritten without prompting. Be sure to select a blank folder if you want to skip this possible problem.

Mask for output filenames

With batch operations, GConvert will generally create a lot of files and therefore it will not prompt you for each filename. That's why it uses a mask to determine the filename of each output file. The mask contains some variables (specific words recognized by GConvert) that are then replaced by associated values. The values of course depend on the current icon image being converted and saved.

GConvert's variables are words enclosed into brackets {}. The following table lists the possible variables and their description, it is followed by several examples.
 

Variable NameDescription
{iconname}storage name in icon library or icon filename (without extension)
{height}height of the icon image (pixels)
{width}width of the icon image (pixels)
{pixelformat}color depth of the icon image (in bits)
{iconindex}index of the icon in the library (otherwise 0)
{imgindex}index of the icon image in the icon resource
{srcfilename}filename of the icon resource or icon library (without extension)

You do not need to specify the file extension (as it depends on the output format): GConvert automatically adds it.

By default GConvert uses this mask: {iconname}-{width}x{height}x{pixelformat}

A result could be sample1-32x32x8.ico or sample1-64x64x32.bmp.

Several other masks are possible:

  1. {iconname}-{iconindex}-{imgindex}
  2. {srcfilename}-{iconindex}-{imgindex}
  3. {imgindex}-{width}-{height}-{pixelformat}
  4. {srcfilename}-{width}-{height}-{pixelformat}
  5. {iconname}-{iconindex}-{imgindex}-{width}-{height}-{pixelformat}
  6. ....

To ensure files are not overwritten by next ones, you should always some combinations like

{iconindex} + {imgindex} or {iconname} + {width} + {height} + {pixelformat}

Finally be sure to read the Saving single icons help topic too.

 


Main Viewer

Common Operations

About plug-ins

How do I...