Parametry wiersza polecenia

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

Pojedynczy plik lub folder

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

resize.exe <File/Folder> [Options]

Przykład:

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

Powyższy przykład spowoduje załadowanie wszystkich obsługiwanych plików obrazu z folderu c:\photos 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:

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!


Wiele plików

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

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

Przykład:

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).


Lista plików

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]

Przykład:

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

Zawartość 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

Opcje

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 = rozdzielczość pulpitu
  • or one of the available profile names, like “Znak wodny”

Note: If the profile name contains spaces, make sure to use quotes. For example:
/profile=“mój profil niestandardowy”

/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”.

Possible values:

  • fit: Resize and fit image into the target dimensions, keeping the original aspect ratio. This is the default.
  • stretch: Resize and stretch image to the target aspect ratio. Width and height will always be as specified, but result can be deformed.
  • center: Center image in the target dimensions. Remaining background (canvas) will be filled with a replacement color.
  • crop: Crop image to center with target dimensions. If image is larger than target dimensions, it will be centered.
  • extend: Make image square by extending short sides with blurred content.
/Filter=[fastlinear|linear|lanczos|cubic|nearest]

Defines the filtering mode used to scale images, default is “lanczos”.

Possible values:

  • fastlinear: Fast linear interpolation (fastest, lowest quality)
  • linear: Linear interpolation (fast, medium quality)
  • lanczos: Lanczos interpolation (slow, best quality)
  • cubic: Cubic interpolation (slow, best quality)
  • nearest: nearest neighbor interpolation
/Format=[original|bmp|jpg|gif|png|tif|jp2|pdf|psd|pcx|tga|webp|ico]

Defines the output image 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 lub PNG).

Obsługiwane wartości BMP: auto, 32, 24, 8, 4, 1
Obsługiwane wartości 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 lub TIFF)

Obsługiwane wartości JPG: auto, RGB, YCbCr, CMYK, Grayscale
Obsługiwane wartości 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 = Wyłączone
  • 1 = On (default)
/Exif=[0|1]

Copy EXIF metadata (for JPG):

  • 0 = Wyłączone
  • 1 = On (default)
/Xmp=[0|1]

Copy XMP metadata (for JPG):

  • 0 = Wyłączone
  • 1 = On (default)
/Iptc=[0|1]

Copy IPTC metadata (for JPG):

  • 0 = Wyłączone
  • 1 = On (default)
/Icc=[0|1]

Copy embedded ICC profiles (for JPG):

  • 0 = Wyłączone
  • 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 = U góry z lewej
  • 1 = Górne Centrum
  • 2 = Górny Prawy
  • 3 = Lewy Dolny
  • 4 = Centrum Dolny
  • 5 = Prawy Dolny
  • 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:

%Foryginalna nazwa pliku
%EOryginalne rozszerzenie pliku
%DIROryginalna nazwa folderu
%PWybrany profil
%WSzerokość obrazu wyjściowego
%HWysokość obrazu wyjściowego
%NKolejny numer
Number of N’s determines number of digits:
%NN = 01, %NNN = 001, itd.
%N=xStart counting from x, where x is a number
%DCurrent day (01-31)
%MCurrent month (01-12)
%YYCurrent year (2 digits)
%YYYYCurrent year (4 digits)
X-ArtistEXIF informacje o artystach
%X-CameraEXIF informacje kamera
%X-CopyrightEXIF informacje o prawach autorskich
%X-Datedata EXIF
%X-Descriptionopis EXIF
%X-SoftwareEXIF informacje o oprogramowaniu
/FileDate=[0|1]

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

/Dpi=<value>

Zmień wartość DPI dla formatów, które go obsługują (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).

/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
Maksymalna wartość dla <v> oraz <h> is 8.

/Policy=[always|enlarge|reduce]

Resize policy to use:

  • always = Zawsze zmieniaj rozmiar
  • enlarge = Powiększaj tylko obrazy mniejsze niż określona szerokość i wysokość
  • reduce = Zmniejszaj tylko obrazy większe niż określona szerokość i wysokość
/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 = Tworzenie kopii
  • original = Zastąpić oryginalne pliki
  • move = Przenoszenie plików
  • zip = Kompresować w pliku ZIP
  • pdf = Utwórz PDF
  • gif = Tworzenie animowanych GIF z plików wejściowych
/Dest=[same|desktop|<path>]

Destination for output:

  • same = Same folder as original (default)
  • desktop = Pulpit
  • <ścieżka> = A custom path, for example: “c:\my path”
/ForceDest

Utwórz katalog docelowy, jeśli jeszcze nie istnieje, nie pytając o to

/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 = Włączone
/Conflict=[ask|overwrite|skip|rename]

Defines what to do in case of a filename conflict:

  • ask = Wyświetlanie monitu do użytkownika
  • overwrite = Nadpisać bez ostrzeżenia
  • skip = Nie dotykaj i nie pomijaj pliku
  • rename = Rename new file, likefile (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.