The ansel-cli binary starts the command line interface variant of Ansel which allows images to be exported.

Ten wariant nie otwiera żadnego ekranu - działa w trybie czystej konsoli bez uruchamiania GUI. Ten tryb jest szczególnie przydatny w przypadku serwerów, wykonujących zadania w tle.

ansel-cli can be called with the following command line parameters:

 1ansel-cli [<input file or folder>]
 2              [<xmp file>]
 3              <output file or folder>
 4              [--width <max width>]
 5              [--height <max height>]
 6              [--hq <0|1|true|false>]
 7              [--upscale <0|1|true|false>]
 8              [--style <style name>]
 9              [--style-overwrite]
10              [--apply-custom-presets <0|1|false|true>]
11              [--out-ext <extension>]
12              [--import <file or dir>]
13              [--icc-type <type>]
14              [--icc-file <file>]
15              [--icc-intent <intent>]
16              [--verbose]
17              [--help [option]]
18              [--core <Ansel options>]

Użytkownik musi określić plik wejściowy i wyjściowy. Pozostałe parametry są opcjonalne.

<plik lub folder wejściowy>
Nazwa pliku wejściowego lub folderu (zawierającego obrazy) do wyeksportowania. Jeśli chcesz przetwarzać wiele obrazów lub wiele folderów, użyj opcji --import.
<plik xmp>
Opcjonalna nazwa pliku pobocznego XMP zawierającego dane stosu historii do zastosowania podczas eksportu. Jeśli ta opcja nie jest podana, Ansel będzie szukać pliku XMP, który należy do podanych plików wejściowych.
<output file or folder>
The name of the output file or destination folder. The export file format is derived from the file extension or from the --out-ext option. You can also use a number of variables in the output filename. For obvious reasons this parameter is mandatory if you use the program on an image folder containing multiple images. If you specify output folder it is recommended that you also specify the file format with --out-ext.
--width <maksymalna szerokość>
Ogranicza szerokość eksportowanego obrazu do podanej liczby pikseli.
--height <maksymalna wysokość>
Ogranicza wysokość eksportowanego obrazu do podanej liczby pikseli.
--hq <0|1|true|false>
Define whether to use high quality resampling during export (see the export module reference for more details). Defaults to true.
--upscale <0|1|true|false>
Określa, czy zezwalać na upscaling podczas eksportu. Wartość domyślna to fałsz.
--style <nazwa stylu>
Określa nazwę stylu do zastosowania podczas eksportu. Jeśli określono styl, należy również podać ścieżkę do katalogu konfiguracyjnego Ansel (np. --core --configdir ~/.config/Ansel). Domyślnie nie jest stosowany żaden styl.
--style-overwrite
Określony styl nadpisuje stos historii, zamiast być do niego dołączany.
--apply-custom-presets <0|1|false|true>
Czy załadować plik data.db, który zawiera presety i style. Wyłączenie tej opcji umożliwia uruchamianie wielu instancji Ansel-cli kosztem niemożności użycia opcji --style. Wartość domyślna to prawda.
--out-ext <rozszerzenie>
Ustawia rozszerzenie pliku wyjściowego. Jeśli zostało zdefiniowane, ma ono pierwszeństwo przed <plikiem wyjściowym>. Domyślnie jest to wyodrębnione z <pliku wyjściowego>. Domyślnie jest to jpg, jeśli określono <folder wyjściowy>.
--import <plik lub katalog>
Określ plik wejściowy lub folder, może być używany wielokrotnie. Tej opcji nie można łączyć z <plikiem lub folderem wejściowym>.
--icc-type <type>
Specify the ICC profile type, which is the same as specifying the “output profile” in the output color profile module. Defaults to “image specified”. Use --help icc-type to obtain a list of the supported types. See the output color profile module reference for a more detailed description of the available options.
--icc-file <file>
Specify the ICC profile filename. Defaults to an empty filename.
--icc-intent <intent>
Specify the rendering intent. Defaults to “image specified”. Use --help icc-intent to obtain a list of the supported intents. See rendering intent for a more detailed description of the available options.
--verbose
Włącza szczegółowe wyjście.
--help [opcja]
Drukuje podstawową informację o użyciu i kończy działanie. Jeśli podano option, dodatkowo wypisuje użycie dla danej opcji.
--core <opcje Ansel>
Wszystkie parametry wiersza poleceń następujące po --core są przekazywane do jądra Ansel i obsługiwane jako parametry standardowe. Zobacz opis komendy Ansel dla uzyskania szczegółowego opisu.

export options

Export options for Ansel are defined as configuration items, set from within the export module. There are two ways to alter this configuration when using Ansel-cli, as described below.

use the export module

The Ansel-cli command will use the last format configuration used in the export module, when run in interactive (gui) mode. You may therefore manually set your desired format options in the Ansel gui and then run Ansel-cli to export your files.

pass options on the command-line

You can set any export format configuration option using the following syntax:

1    --core --conf plugins/imageio/format/<FORMAT>/<OPTION>=<VALUE>

where <FORMAT> is the name of the desired output format and <OPTION> is any configuration option for that format.

An option set in this way will not be permanently stored but will be used just for this run of Ansel-cli.

The following sections describe the configuration options/values that are available for each export format:

jpeg

quality
The compression quality (5 - 100)

j2k (jpg2000)

format
The format of the output
  • 0: J2K
  • 1: jp2
quality
The compression quality (5 - 100)
preset
The DCP mode
  • 0: Cinema2K, 24 FPS
  • 1: Cinema2K, 48 FPS
  • 2: Cinema4K, 24 FPS

exr (OpenEXR)

bpp
The bit depth (16 or 32)
compression
The compression type
  • 0: uncompressed
  • 1: RLE
  • 2: ZIPS
  • 3: ZIP
  • 4: PIZ
  • 5: PXR24
  • 6: B44
  • 7: DWAA
  • 8: DWAB

pdf

title
The title of the pdf (any character)
size
The size of the pdf (a4, a3, letter, legal)
orientation
the paper orientation of the pdf
  • 0: portrait
  • 1: landscape
border
The empty space around the pdf; format: size (a number) + unit; examples: 10 mm, 1 inch
dpi
The resolution in dots per inch inside the pdf (1 - 5000)
rotate
Whether to rotate the pdf (0 or 1)
icc
Whether to embed an icc profile (0 or 1)
bpp
The bit depth (8 or 16)
compression
Whether to compress the pdf (0 or 1)
mode
The mode to put the images in the pdf
  • 0: normal: just put the images into the pdf
  • 1: draft: images are replaced with boxes
  • 2: debug: only show the outlines and bounding boxen

pfm

No options provided.

png

bpp
The bit depth (8 or 16)
compression
The compression level (0 - 9)

ppm

No options provided.

tiff

bpp
The bit depth (8, 16, 32)
compress
The compression type
  • 0: uncompressed
  • 1: deflate
  • 2: deflate with predictor
compresslevel
The compression level (0 - 9)
shortfile
B&W or color image
  • 0: write rgb colors
  • 1: write grayscale

webp

comp_type
The compression type
  • 0: lossy
  • 1: lossless
quality
the compression quality (5 - 100)
hint
The preferred way to manage the compression
  • 0: default
  • 1: picture: digital picture, like portrait, inner shot
  • 2: photo: outdoor photograph, with natural lighting
  • 3: graphic: discrete tone image (graph, map-tile etc)

kopiuj

No options provided.

xcf

bpp
The bit depth (8, 16, 32)