Home |
Batch Conversion |
Batch ConversionImage Convert can be used to perform list or batch conversion of multiple images. This is helpful in many cases and absolutely essential when the goal is to create an optimal palette for multiple images. Batch conversion is selected by specifying an input file with a filename extension of .CMD, which indicates that the source file is actually a command file, rather than an individual image file. Command files are simply lists of input images, along with optional comments. They do not instruct Image Convert in terms of the type of conversion to perform. This is still done by selecting the appropriate options in the Image Convert dialog. The command file should be an ASCII file, with one command per line. Each command line should contain a single input image path and filename, and the output image name. The source file and output image names can be separated by any combination of space, comma, and tab characters. The output image name is the name to be used by the application when passing the image address to one of the PegScreen bitmap display functions. When performing batch conversion, all of the resulting output images are saved in one output file, along with the custom palette if a custom palette has been generated. Very large command files are often easier to maintain by entering comments within the file to indicate where groups of bitmap files are used. Comment lines are indicated by a single '#' character in the first column of a line. The following is an example of a typical command file: # # This is a comment line # Each command line specifies one input file, # and the name of the resulting PegBitmap structure. # \graphics\bitmaps\stop.bmp StopSign \graphics\bitmaps\go.bmp GoSign # # note that .bmp and .gif files can be processed # within the same .cmd file # \graphics\targa\yield.gif YieldSign In the above example, the goal is to produce three PegBitmaps and a single optimal palette for use with these three images. The source images are stop.bmp, go.bmp, and yield.gif. The resulting PegBitmaps will be named gbStopSignBitmap, gbGoSignBitmap, and gbYieldSignBitmap, respectively. Image Convert will process each of the input files using the options selected in the Image Convert dialog, and will save all output to the single file specified in the 'Output File' field of the conversion dialog.
|