Syntax for MSBatch Raster File Conversion
Syntax for command line raster file conversion is as follows:
msbatch rastconv inname <<input filename><option1 option2 option3… option8>>
For example, to convert all the PCX files in the C:\pcx directory into TIFF files in the C:\tiff directory, you could use the following command line:
msbatch rastconv inname:c:\pcx\*.pcx outtype:tif outname:c:\tiff\*.tif
The following table lists the available options for command line conversion of raster files.
Keyword | Option | Description |
---|---|---|
inname: | <inputfilename> | Required — name of input file. May include wildcards. For details, see the list of Supported Input File Formats |
outname: | <outputfilename> | If incomplete, input filename is used. |
color: | <rgb|16|256|greyscale|monochrome> | Color depth in output file. |
outtype: | bmp — (.bmp) Windows BMP cal — (.cal) CALS crl — (.crl) CRL ecw — (.ecw) ERMapper gif — (.gif) Compuserve GIF gtiff — (.tif) Georeferenced TIFF hmr — (.hmr) HMR img — (.img) Erdas IMG imgmap — (.p) IMG (mapped) imgpal — (.p) IMG (256 colors) imgrgb — (.a) IMG (unmapped) itiff — (.itiff) Internet TIFF jpg — (.jpg) JPEG (JFIF) jpg2000 — (.jp2) JPEG 2000 lrd — (.lrd) LRD pcx — (.pcx) PC Paintbrush png — (.png) PNG sun — (.rs) Sun Raster targa — (.tga) TrueVision Targa tiffcomp — (.tif) Compressed TIFF tiffraw — (.tif) Uncompressed TIFF wbmp — (.wbmp) Wireless BMP |
Output file type. See details in the list of Supported Output File Formats. See note below. |
compression: | <none|bmprle8|ccittfax3|ccittfax4|lzw|packbits|jpegmin|jpeglow|jpegmed|jpeghigh|deflate|rle1|flashpix|lrd> | Compression of the output format. See details about compression types in the list of Supported Output File Formats. |
width: | <outputwidth> | Output width defaults to input width. |
height: | <outputheight> | Output height defaults to input height. |
tiled: | <on|off> | If On, converted files are tiled (does not apply to all formats). |
resampled: | <on|off> | If On, any transformation (rotation, affinity) is removed. |
nbcolors: | <nbcolors> | Number of colors used to reconstruct the palette. |
location: | <hgr|worldfile> | Type of sister file to use for georeference information for the resulting output. hgr — HGR sister file World File — ESRI world file Hgr and world file may be used only if the file does not have built-in georeference (for example: .jpg or .bmp file formats). |