=============================================================================
Light Image Resizer - Command Line Switches / Parameters
=============================================================================

Light Image Resizer can be run by command line. Please refer to the 
following reference and examples.

---------------------
Single file or folder
---------------------

To process a single file or folder, simply use the following syntax:

  resize.exe <File/Folder> [Options]

Example:

  resize.exe c:\photos /profile=original /format=bmp /run

The example above will load all supported image files from the c:\photos 
folder and create copies of them in bitmap format (BMP) while keeping the 
original dimensions.

You can also use wildcards to load specific file types from a folder. If you 
want to convert all bitmap images from a folder to PNG format:

Example:

  resize.exe "c:\my images\*.bmp" /profile=original /format=png /run

Note: If a path contains spaces, it needs to be wrapped in quotes, like this:
"c:\my photos"
This applies to all parameters where values may contain spaces!


--------------
Multiple files
--------------

You can process several files in one operation. Make sure to use quotes if 
needed (as explained above):

  resize.exe <Filename1> <Filename2> ... [Options]

Example:

  resize.exe "c:\my photos\image1.jpg" "c:\my photos\image2.jpg" /profile=desktop /run

Note: The maximum number of characters in a command line may be limited. 
If you want to process a large amount of files, or path names are very long, 
please consider using a file list (see next section for details).


---------
File list
---------

To process large numbers of files at once, we recommend to use a file list. 
Basically a simple text file, which contains the full path for each image 
file (separated by line breaks). The command line uses this syntax:

  resize.exe /fl=<Filename> [Options]

Example:

  resize.exe /fl="c:\my path\filelist.txt" /w=800 /h=600 /action=original /run

Content of filelist.txt:

  c:\photos\image1.jpg
  c:\photos\image2.jpg
  c:\photos\image3.jpg

The example above will load the 3 image files specified in the file list and 
resize them to 800 x 600 pixels, replacing the original files.


----------------------
Exit code / error code
----------------------

The application will return one of the following error codes on exit:

  0: All files were processed successfully
  1: One or more errors occurred during processing
  2: One or more warnings occurred during processing


-------
Options
-------

The parameters below can be used to set processing options. Parameters are case-insensitive.

/Profile=[original|desktop|"<profile name>"]

  Defines the profile to use:
  original = original resolution (default)
  desktop = desktop resolution
  or one of the available profile names, like "Watermark"

  NOTE: If the profile name contains spaces, make sure to use quotes. For example: /profile="my custom profile"


/W=<width>

  Defines the output width for images.


/H=<height>

  Defines the output height for images.


/Unit=[pixel|percent]

  Defines the unit used for width and height, default is "pixel".


/Mode=[fit|stretch|center|crop|extend]

  Defines the resize mode to use, default is "fit".


/Filter=[fastlinear|linear|lanczos|cubic|nearest]

  Defines the filtering mode used, default is "lanczos".


/Format=[original|bmp|jpg|gif|png|tif|jp2|pdf|psd|pcx|tga|webp|ico]

  Defines the output file format, default is "original".


/BitDepth=[auto|32|24|8|4|1]

  Defines the bit depth to save with (only available if output format is BMP or PNG).
  Supported values for BMP: auto, 32, 24, 8, 4, 1
  Supported values for PNG: auto, 32, 24, 8


/ColorDepth=[auto|RGB|YCbCr|CMYK|Grayscale|CIELAB]

  Defines the color depth to save with (only available if output format is JPG or TIFF).
  Supported values for JPG: auto, RGB, YCbCr, CMYK, Grayscale
  Supported values for TIFF: auto, RGB, CMYK, CIELAB


/Quality=[1-100]

  Defines the compression quality from 1 to 100, only valid for JPG (default 80).


/AdjustPortrait=[0|1]

  Adjust resolution for portrait images:

  0 = Off
  1 = On (default)


/Exif=[0|1]

  Copy EXIF metadata (for JPG):

  0 = Off
  1 = On (default)


/Xmp=[0|1]

  Copy XMP metadata (for JPG):

  0 = Off
  1 = On (default)


/Iptc=[0|1]

  Copy IPTC metadata (for JPG):

  0 = Off
  1 = On (default)


/Icc=[0|1]

  Copy embedded ICC profiles (for JPG):

  0 = Off
  1 = On (default)


/WmFile="<filename>"

  Embed watermark from specified image file.


/WmAlpha=[0-255]

  Transparency for watermark from 0 (fully transparent) to 255 (opaque), 
  default is 255.


/WmPosition=[0-6]

  Watermark position in output image:

  0 = Top Left
  1 = Top Center
  2 = Top Right
  3 = Bottom Left
  4 = Bottom Center
  5 = Bottom Right
  6 = Center (default)


/WmSpaceX=<value>

  Horizontal spacing (in pixels) for watermark if not centered, default is 0.


/WmSpaceY=<value>

  Vertical spacing (in pixels) for watermark if not centered, default is 0.


/Mask="<filename mask>"

  Output filename mask to be used, default is "%F [%P]".
  The mask can contain the following variables:

  %F             Original filename
  %E             Original file extension
  %DIR           Original folder name
  %P             Selected profile
  %W             Output image width
  %H             Output image height
  %N             Consecutive number, number of N's determines number of digits:
                 %NN = 01, %NNN = 001, etc.
  %N=x           Start counting from x, where x is a number
  %D             Current day (01-31)
  %M             Current month (01-12)
  %YY            Current year (2 digits)
  %YYYY          Current year (4 digits)
  %X-Artist      EXIF artist information
  %X-Camera      EXIF camera information
  %X-Copyright   EXIF copyright information
  %X-Date        EXIF date
  %X-Description EXIF description
  %X-Software    EXIF software information
  


/FileDate=[0|1]

  If enabled (1), keeps file date of original file. Default is disabled (0).


/Dpi=<value>

  Change DPI value for formats that support it (JPEG, TIFF). Value can be
  between 1 and 1000.


/Invert=[0|1]

  If enabled (1), colors will be inverted. Default is disabled (0).


/Grayscale=[0|1]

  If enabled (1), converts images to grayscale. Default is disabled (0).


/Sepia=[0|1]

  If enabled (1), adds sepia effect to images. Default is disabled (0).


/AutoEnhance=[0|1]

  If enabled (1), an automatic enhancement filter is applied to images. Default
  is disabled (0).


/Brightness=<value>

  Decrease or increase brightness by specified value (-100 to 100).


/Contrast=<value>

  Decrease or increase contrast by specified value (-100 to 100).


/Policy=[always|enlarge|reduce]

  Resize policy to use:
  always	= Always resize
  enlarge	= Only enlarge images smaller than specified width and height
  reduce	= Only reduce images larger than specified width and height


/Split=<v>,<h>

  Split images into parts, where <v> is the number of vertical rows, and
  <h> the number of horizontal columns. For example: /split=2,4
  The maximum value for <v> and <h> is 8.


/Rotate=<value>

  Rotate image by specified value in degree (-180 to 180).
  Positive values will rotate clockwise, negative values counter-clockwise.


/Flip=[horizontal|vertical]

  Flip the image either horizontally or vertically.


/FixGamma=[0|1]

  If enabled (1), gamma value is improved when resizing. This can prevent
  images from getting darker. Default is disabled (0).


/OptimizePng=[0-7]

  Optimize compression of PNG images with specified level from 0 (fast) to
  7 (very slow).


/OptimizeJpeg=[0|1]

  If enabled (1), JPEG compression is optimized. This can be useful for
  images targeted for the web. Default is disabled (0).


/Action=[copy|original|move|zip|pdf|gif]

  One of these actions to be performed:

  copy		= Create copies
  original	= Replace original files
  move		= Move files
  zip		= Compress in a ZIP file
  pdf		= Create a PDF
  gif           = Create animated GIF from input files


/Dest=[same|desktop|<path>]

  Destination for output:

  same		= Same folder as original (default)
  desktop	= Desktop
  <path>	= A custom path, for example: "c:\my path"


/ForceDest

  Create destination directory if it doesn't exist yet without prompting


/Details

  Show details (log) during operation.


/Minimized

  Minimize progress window during operation.


/AutoClose

  Close after images have been processed.
  If you want to close only if there were no errors or warnings, use: 
	/AutoClose=1


/Subfolders=[0|1]

  If a folder is specified as the first parameter, this determines if 
  subfolders will be searched as well:
	
  0 = Off (default)
  1 = On


/Conflict=[ask|overwrite|skip|rename]

  Defines what to do in case of a filename conflict:

  ask		= Display prompt to user
  overwrite	= Overwrite without warning
  skip		= Don't touch and skip file
  rename	= Rename new file (e.g. "file (2)")


/Run

  Start processing immediately.


/OptionsPage

  Go to options page directly after launch. Useful if you add files by 
  command line, and just need to review options.

