Command line options

This is list of all options available in the program. Examples of possible values are written in maroon color.

If you experience any problems with command line, if you get large or corrupted or low quality images, please, feel free to ask us, and we'll try to find solution for your case.

2TIFF.exe s="C:\Original files\*.*" srclst="C:\list.txt" d="C:\Converted files" -namegen="[name]_nr[counter].[ext]" -sortlstAZ -prior1 -binarize2 -wp95 -h56 -sm1 -dpiver300 -dpihor300 -prop -rot45 -mirror(0;1) -cd8 -dither -quantize6 -msw -cmyk -sep(1;12) -ov -sf -g -totranspm(255,0,0) -notransp -crop(10;20;20;15) -acropm(255;255;255) -bc16711680 -coleff(4;10;20;30) -log -imginfo -scust2 -nodlg -collage(3;3;0;0;0) -unite -q65 -sstrip -ct2 -rgb -remsrc -sizeto(10;15;140;160) -label("C:\Original\label.png";0;2;2;3;-1) -keepexif -lsb2msb -lzwpredict

Options:

s=
Input file(s) path (use only full path, not relative).

You can use the following masks:
<folder path>\*.* - converts all graphic files from folder;
<folder path>\*.jpg - converts all JPEG files from folder;
<folder path>\MyImage.* - converts all files with name MyImage from folder;
<folder path>\MyImage.jpg - converts only MyImage.jpg from folder.

Example:

s="C:\My Documents\*.*"
or
s="C:\My Images\*.bmp"


top
srclst=
This option allows you to create a list of paths and masks for files you want to convert. You may use it instead of s= option, or together with it. List file may have any name or extension, but must be in text format.

Example of list file:

E:\Graphic Files\in1\*.*
E:\Graphic Files\in2\*.jpg
E:\Graphic Files\in3\*.bmp
E:\Graphic Files\in4\image.gif


top
d=
Destination folder path (use only full path, not relative). If you don't specify this value a source folder will be used by default. You may specify file name using option -namegen.

Example:

d="C:\Converted Images"

top
-namegen=
This option allows to form output file names.
Parameters:
[name] name of input file
[dstfldrname] name of destination folder
[srcfldrname] name of source folder
[counter] file counter for the current session
There are available three ways to count files.
[counter] - simple counter, just inserts file number in current session (-namegen=[counter].jpg => 3.jpg - all examples are for the third file converted)
[counterX] - X here must be replaced with number of digits in counter; if file number is shorter then specified number of digits, it will have leading zeros before it (-namegen=[counter4].jpg => 0003.jpg)
[counterX;Y] - works the same as previous one, Y is number to start count from (-namegen=[counter4;25].jpg => 0028.jpg)
[ext] output file extension
[srcext] input file extension
[datatime] date and time of output file creation
[year] year
[yday] day of a year (from 1 up to 365 or 366 depending on year)
[month] month
[mday] day of a month (from 1 up to 28, 30 or 31 depending on month)
[wday] day of a week (Sunday, Monday, etc)
[hour] hour
[minute] minute
[second] second
[pagenum] number of page in multipage file

Examples:

2gif.exe s="E:\Graphic Files\*.*" d="E:\out" -namegen="[name]_nr[counter].[ext]"
2jpeg.exe s="E:\Graphic Files\*.*" d="E:\out" -w125 -h125 -prop -sm1 -namegen="thmb_[name].jpg"
2tif.exe s="E:\Graphic Files\*.*" d="E:\out" -namegen="[name].[srcext]"

top
-sortlstAZ or -sortlstZA
Use this options to sort list of input files before conversion in alphabetical order from A to Z and from Z to A. Sorting is applied in each folder.
Top
-prior1
This option sets *.exe file priority. It may be useful if the program is running on a server.
Possible values:
-prior0 low priority
-prior1 normal priority (value by default)
-prior2 high priority
-prior3 realtime priority (goes before all other tasks)

Top
-binarize2
This option can be used for converting low quality images and scans into black and white mode.
Values:
-binarize1 - image contract will be improved by selecting the optimal contrast value
-binarize2 - does the same as -binarize1, plus binarize image and selects the optimal monochromatization threshold value
Top
-w
Destination image width. If you don't specify this value a width of source image will be used by default.
Output image size (height and width) can be set both in pixels and in percents of input image.

Example:

-w95 - width = 95 pixels
-wp95 - width = 95 %.

In that case real size in pixels will be calculated individually for each image during it's processing. Size in pixels is to be set accurate within integer, in percents accurate within one ten thousandth. After size is recalculated from percents to pixels the result will be approximated to integer. Image width and height can be specified both in the same and the different units.
Top
-h
Destination image height. If you don't specify this value a height of source image will be used by default.
Output image size (height and width) can be set both in pixel and in percent of input image.

Example:

-h95 - height = 95 pixels
-hp95 - height = 95 %.

In that case real size in pixels will be calculated individually for each image during it's processing. Size in pixels is to be set accurate within integer, in percents accurate within one ten thousandth. After size is recalculated from percents to pixels the result will be approximated to integer. Image width and height can be set both in same and different units.
Top
-sm
Method of image stretching. Default value is 0.
0 - Delete pixel method. This method is very fast and provides medium quality of stretching.
1 - Bilinear interpolate method. This method is slow but provides best quality of stretching.

Example:

-sm0
or
-sm1

top
-dpiver
This option specifies vertical resolution of output image (in DPI).

Example:

-dpiver70

top
-dpihor
This option specifies horizontal resolution of output image (in DPI).

Example:

-dpihor150

top
-prop or -propfill
This option allows to stretch image proportionally. Read more about this option in "How to stretch image proportionally?" topic.
Top
-rot<Angle> or -roti<Angle>
-rot - fast rotation
-roti - rotation with bilinear interpolation (this method provides better quality)
<Angle> - Image rotation angle (default value is 0.00). Must be set within the range of 0.00..360.00. The angle step is 0.01.

Note!"rot" option is an alternative for "roti". Please do not use "rot" and "roti" options in one command line

Example:

-rot90
or
-rot186.5


top
-mirror(<MV>;<MH>)
mirror image
<MV> - Mirror image vertically
<MH> - Mirror image horizontally

Example:

-mirror(0;1)
or
-mirror(1;0)
or
-mirror(1;1)


top
-cd
Output files color depth. Possible values are 1, 4, 8, 24, 32, 48 or 64. If you don't specify color depth, it will be selected automatically depending on source file characteristics and output file type of compression.

Example:

-cd48

top
-dither
Use this option to use dithering in color reduction in quantization.
Top
-quantize
Quantization algorithm quality. Only for creating images with 8 BPP or less. Possible values are from 0 to 8.

Example:

-quantize4

top
-msw or -msb
-msw - This option allows to save back and white tiff files in PhotoMetricInterpritation = MINISWHITE mode. Many viewers act as though it is the only possible mode for black and white tiff files. That is why they may display files saved in other mode not correctly. If you want your files to be correctly displayed by all viewers, use this option. Note that using this option may slow down conversion.
If you don't use this option files will be saved in back and white tiff files either in PhotoMetricInterpritation = MINISWHITE mode, or in PhotoMetricInterpritation = MINISBLACK mode, depending on file.
-msb - This option is opposite to the previous one. It allows to save back and white tiff files in PhotoMetricInterpritation = MINISBLACK mode.
top
-cmyk
Use this option to save tiff file in CMYK color space. Otherwise file will be saved in RGBA color space or its derivatives. Only for color depth equal to 32 (option -cd32).
top
-sep(<first>;<number>)
Save each page of multipage files (GIF, TIFF, DCX, ANI, CUR, MNG) separately if this option set.
<first> - first page,
<number> - number of pages to be separated.
If you use "-sep" option without parameters, all pages will separated.

Example:

-sep(1;99)
or
-sep(5;2)


top
-ov
The existing destination files will be overwritten if you use this option.
Top
-sf
Scan subfolders if this option set. Converted files will be placed into destination folder with source folders structure saving.
Top
-g
saves image in grayscale palette
top
-totranspm(R,G,B)
makes one or several colors transparent

Example:

2tiff.exe s="C:\Source Images\*.*" d="C:\out" -totranspm(255,0,0)

top
-notransp
removes transparancy from .tif file; transparent areas will be filled with background color specified by -bc option, if -bc is not specified, white color will be used

Example:

2tiff.exe s="C:\Source Images\*.tif" d="C:\out" -bcm(0,255,0) -notransp

top
-crop(<X0>;<Y0>;<X1>;<Y1>) or -cropm (<X0>;<Y0>;<X1>;<Y1>)
-crop - Crop image as rectangle:
x0 is a left margin, y0 is a top margin,
x1 = x0 + new image width, y1 = y0 + new image height

or

-cropm - Crop image margins:
x0 is a left margin, y0 is a top margin,
x1 is a right margin, y1 is a bottom margin

Size for crop can be specified both in pixels and in percents of input image.

Example:

-crop(10;20;30;40) - sizes are in pixels
-cropp(10;20;30;40) - sizes in percents

Size in pixels is to be specified accurate within integer, in percents - accurate within one ten thousandth. After size is recalculated from percents to pixels the result will be approximated to integer.
All sizes for crop should be in the same units - either all in pixels, or all in percents.
Top
-acrop
This option allows to automatically crop photo margins. In brackets you should specify color of margins. The program will automatically find on image a rectangle containing pixels with color different from color specified. After this it will crop the margins.

Example:

Color may be specified in decimal
-acrop16777215
or in hexadecimal
-acrophFFFFFF
or as a mask
-acropm(255;255;255)

top
-bc
Background color. Used for vector image rasterization, for image rotation and for converting images with transparent regions such as GIF, PNG, and TGA.
Background color can be set both in decimal and hexadecimal format and also as a mask.

Example:

red color can be set as
-bcm(255;0;0)
or
-bchFF0000
or
-bc16711680


top
-coleff(<EFF>;<EP1>;<EP2>;<EP3>)
Use this option to apply to images one of the following color effects. Read more about color effects.

Method <EFF> <EP1> <EP2> <EP3>
Brightness 0 amount(-255..255) - -
Contrast 1 amount(-127..127) - -
Auto Contrast 2 - - -
Gamma Corr. 3 amount(0.00..7.00) - -
Color Balance 4 red(-255..255) green(-255..255) blue(-255..255)
Negative 5 - - -
Mosaic 6 x-Amount(0..img width) y-Amount(0..img height) -
GrayScale 7 - - -
Blur 8 - - -
Gaussian Blur 9 x-Radius(0..255) y-Radius(0..255) -
Sharpen 10 - - -
Emboss 11 - - -
Water Color 12 - - -
Smoothing Noise 13 - - -
Maximum 14 - - -
Minimum 15 - - -
Unsharpen Mask 16 Radius (0..255) Amount (1..500) Threshold (0..255)

Example:

-coleff(0;10)
or
-coleff(4;10;20;30)
or
-coleff(5)


top
-log
create a log-file in destination folder
top
-imginfo
if this option is used information about each loaded file - file format, file length (bytes), image width and height (pixels), color depth (bpp), image resolution (dpi) and number of pages - will be displayed in DOS window and recorded in log file
top
-scust
adds additional stretch algorithm options
-scust1 - stretch only if image is smaller then specified size
-scust2 - stretch only if image is bigger then specified size
top
-nodlg
do not show demo-warning dialog before converting in demo version. This warning pop-ups before conversion in demo version. It doesn't allow the program to be launched from java and Visual Basic script, and also from hide mode (parameter SW_HIDE in ShellExecute() function in Visual C++ and vbHide in Shell() function in Visual Basic).
top
-collage(nh;nv;f1;bh;bv)
This option creates collages from your source images.
nh - number of images in collage horizontally (1, 2, 3, ...)
nv - number of images in collage vertically (1, 2, 3, ...)
f1 - create new collage for any file if 1 (0 or 1). Can used for creating collages from multipage files. Use -sep option for use all pages from multipage file.
bh - empty margin between nearby images in collages horizontally in pixels (0, 1, 2, ...)
bv - empty margin between nearby images in collages vertically in pixels (0, 1, 2, ...)
Use -bc option to set color for empty margin. You may specify file name using option -namegen. If you don't do it, file will be called "collage".

Example:

-collage(3;3;0;0;0)

top
-unite
Unite images from source file(s) into one destination multipage file. Source files will be added into destination multipage file in order of finding them in source folder. You may specify file name using option -namegen.

Example:

-unite

top
-q<Q>
Destination file(s) quality (75 by default). Possible values are from 1 to 99. Used for converting into TIFF with JPEG compression only.

Example:

-q80

top
-sstrip
Create single-strip TIFF file. By default program creates a multi-strip file.
Top
-ct<CT>
TIFF file data compression type. By default is used LZW compression. Please pay attention to the possible color depth values for each compression type. If color depth is specified not correctly, or is not specified at all, the right value will be used automatically.

Compression type <CT> value possible color depth (-cd)
NONE 0 1, 4, 8, 24, 48, 64
CCITT RLE 1 1
CCITT FAX3 2 1
CCITT FAX4 3 1
LZW 4 1, 4, 8, 24, 48, 64
JPEG 6 8, 24
ZIP 7 1, 4, 8, 24, 48, 64
PACKBITS 8 1

Example:

-ct8

top
-rgb
an option for saving to TIFF with JPEG-compression in RGB-mode without sampling
top
-remsrc
Use this option to delete source files.
top
-sizeto
Enlarges canvas size.
Syntax:
-sizeto(new_left;new_top;new_width;new_height)
Parameters new_left and new_top set horizontal and vertical offset. Parameters new_width and new_height set canvas width and height. If no background is specified background will be white. If new_left or new_top are negative, image will be centered vertically or horizontally.

Example:

-sizeto(10;15;140;160)

top
-label(<path>;<location>;X;Y;<blending_mode>;<alpha>)
Use this option to add a watermark to image.
Syntax:
<path> - path to watermark in quotation marks, e.g. "C:\Source Images\label.png". Watermark may be both in vector and raster formats with or without transparent areas;
<location> - anchor point (place on original image where watermark will be added):
    0 - top left corner
    1 - top right corner
    2 - bottom right corner
    3 - bottom left corner
    4 - center
X - watermark shift on X axis (in pixels)
Y - watermark shift on Y axis (in pixels)
<blending_mode> - watermark applying method. Possible values:
     
0 bmNormal  
1 bmDissolve  
2 bmMultiply  
3 bmScreen  
4 bmOverlay  
5 bmLighten  
6 bmDarken  
7 bmDifference  
8 bmHue  
9 bmSaturation  
10 bmColor  
11 bmLuminance  
12 bmAddition  
13 bmSubtract  
14 bmDivide  

<alpha> - Watermark degree of transparency. You may change it before applying.
    -1 - do not change degree of transparency
    0 - absolutely transparent
    255 - absolutely opaque
    from 1 to 254 - partly transparent
top
-keepexif
Moves EXIF data from original file to new file. Dy default EXIF blocks are not saved.
Top
-lsb2msb
This option controls the order of bits in a byte in black-and-white files. Without this option the fill order is MSB2LSB. With the option it is LSB2MSB.
Top
-lzwpredict
Creates files with better LZW compression, though some viewers (for instance Imaging for Windows 2000) ignore tag PREDICTOR in TIFF file header and display images compressed with predictor wrong. By default predictor is not used in LZW method.
Top

The order in which action will be executed is determined by options order in the command line

Example:

"-cropm(10;20;30;40) -coleff(0;10)" -- at first image will be cropped, then color effect will be applied
"-coleff(0;10) -cropm(10;20;30;40)" -- at first color effect will be applied and then image will be cropped