The syntax for the command line for specifying a conversion task is:
ConvertImage /S{Input File(s)} /T{Output File(s)} [/F#] [/C#] [/G] [/R] [/L{LogFile}] [/B{LogToJobFile}] [/V] [/Z] [/1-9] [/P#] [/a-j]
Items above enclosed in square brackets "[ ]" are optional, all other 'switches' are required. Therefore /S, /T should always be specified on the command line. There is one exceptions, however and that is when /G (Save to input folder) is specified, the /T switch is not necessary.
You can include or exclude spaces between switches and parameters. For example, "/F6" is the same as "/F 6".
Command switches are case sensitive, therefore /F is completely different from /f.
For long file names (e.g. a path or file name with spaces in it, or longer than 8.3 format) you are required to use double quotes. For example:
ConvertImage.EXE /S "C:\Input Folder\Coffee.jpg" /T "C:\Output folder\cream.png" /F1 /C8 /V
/S{Input File(s)} is used to specify which files to convert. You can specify a single file, or in some cases a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.BMP"). /T{Output files} should always be different from /S{Input File(s)}.
/T{Output File(s)} is used to specify where to save the converted file(s) to. You can specify a single file, or in some cases a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.BMP"). /T{Output files} should always be different from /S{Input File(s)}.
/F# tells 'Convert Image' what the input file type is. You must supply a number for the # symbol. Remember the input file, specified by the /S{Input File(s)} switch, has an extension which determines it's file type. For all constants see File Type Constants. /F /C are required if you are not using file names with standard file extensions (standard file extensions are jpg, tif, gif, etc). For example if you working with bitmap files with file names like mybitmap.abc then you definitely need to specify the /F and/or /C switch.
/C# tells 'Convert Image' what the output file type is. You must supply a number for the # symbol. Remember the output file, specified by the /T{Output File(s)} switch, has an extension which determines it's file type. For all constants see File Type Constants. /F /C are required if you are not using file names with standard file extensions (standard file extensions are jpg, tif, gif, etc). For example if you working with bitmap files with file names like mybitmap.abc then you definitely need to specify the /F and/or /C switch.
[/G] Save files to their input folders. Use this instead of /T to place the converted files in the same folder as the input file. This cannot be used when converting a single, specified file from within a folder. Use the /T switch instead.
[/R] Seek out and do all files found in the sub-folders specified in the /S switch. Recursive subdirectories. You may add this switch if you are processing whole directories of files. See /S, /T and /G for more details on selecting whole directories to be converted.
[/L{LogFile}] Log file path and name (e.g. d:\mylogs\MoreInfo.LOG). If this switch is specified a log file with the given path and name will be created and the results of the conversion will be written to it. See also /V and /Z.
[/B{LogToJobFile}] Save the Log file as a 'Conversion Job' ONLY IF ERRORS OCCURRED. This is useful if the files that had problems can be done at a later time, or with a different method. /B is different from /L, since the file generated with /B will not include extraneous comments not allowed in a 'Conversion Job' file. Save as a .SII file type so it can be loaded as a job.
[/V] Verbose mode. Specify this switch to display a message box indicating how the conversion went. See also /L.
[/Z] Verbose Log. All file operations will be recorded in the log.
[/1] TIFF: Pages to convert. For example if you have a multi page TIFF and you want to convert the 1st and 3rd page use "/1 1,3". To do pages 2-5 use "/1 2-5" .
[/2] TIFF: Compression to use when converting TO a TIFF file (default is no compression). Use "/2 0" for no compression and "/2 1" for LZW compression.
0 - No compression. Save image as 24bpp uncompressed TIFF file.
1 - LZW. Save image as 24bpp TIFF file with LZW compression.
2 - RLE. Save image as 1bpp TIFF file with RLE compression.
3 - CCITT3. Save image as 1bpp TIFF file with CCITT3 compression.
4 - CCITT4. Save image as 1bpp TIFF file with CCITT4 compression.
[/3] TIFF: Append to existing when converting to a TIFF. Use "/3 TRUE" to append "/3 FALSE" not to.
[/4] JPEG: Quality of the resulting JPG from 0 to 100 (default is 100). 0 is lowest and 100 is highest quality. The higher the quality the larger the resulting output file. Use "/4 100" for highest quality.
[/5] TAG: TITLE of the image. For example to associate the title of "President" to the resulting image use "/5 President" .
[/6] TAG: DESCRIPTION of the image. For example to associate the description of "Money is the product of a humans capacity to think" to the resulting image use "/6 Money is the product of a humans capacity to think" .
[/7] TAG: DATE/TIME of the image. For example to associate the date/time "July 4th 1976" to the resulting image use "/7 July 4th 1976" .
[/8] TAG: AUTHOR of the image. For example to associate the author "Krishnamurti" to the resulting image use "/8 Krishnamurti" .
[/9] TAG: COPYRIGHT of the image. For example to associate the copyright "Copyright 2005, Softinterface" to the resulting image use "/9 Copyright 2005, Softinterface".
/P# Special Process Identifier. An integer, which tells 'Convert Image' which special process to apply to the Input files. For example /P2 tells 'Convert Image' to resize an image. /P is almost always used with /a- /j switches. See table below for a list of all Special Processes.
[/a- /j] These parameters compliment the /P switch which tells 'Convert Image' which special process to perform. /a- /j are used to specify additional parameters that may be necessary for the special process being done. For example /P2 tells 'Convert Image' to resize an image. In this case /a is used to specify the width, /b is used to specify the height, /c is used to specify the method of interpolation and /d is used to specify the background color. This might end up looking like:
ConvertImage /SC:\Input\Tryme.jpg /TC:\Output\Out.jpg /P2 /a10 /b20 /c2 /d0 /V
/P# |
Meaning |
Extra Parameters: /a{Parameter1} /j |
2 |
Transform Resize an Image |
/a = New width of the image (Pixels) /b = New height of the image (Pixels) /c = Method of Interpolation (0 = None, 1 = Billinear, 2 = Bicubic). The method by which the picture is recalculated (shrunk or stretched). You have 3 choices (None, Billinear, and Bicubic). /d = Background color of the new image. This is an integer value. BackColor = Red + Green*256 + Blue*256*256 (Red, Green and Blue are 8 bits each) For example, /e = Retain Aspect Ratio. ("TRUE" or "FALSE"). Set to true to ensure the ratio of height to width remains the same as the input image. Use /a or /b but not both if setting this switch to TRUE. |
See Also:
Helpful Hints for Creating a Command Line
Specifying a Conversion Job File