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

Цей варіант не відкриває жодного вікна – він працює в чисто консольному режимі без запуску графічного інтерфейсу. Цей режим особливо корисний для серверів, що виконують фонові завдання.

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>]

Користувач повинен вказати ім’я вхідного файлу та ім’я вихідного файлу. Усі інші параметри необов’язкові.

<вхідний файл або папка>
Ім’я вхідного файлу або папки (що містить зображення) для експорту. Якщо ви хочете обробити кілька зображень або декілька папок, використовуйте натомість параметр --import.
<xmp file>
The optional name of an XMP sidecar file containing the history stack data to be applied during export. If this option is not provided Ansel will search for an XMP file that belongs to the given input file(s).
<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 <максимальна ширина>
Обмежити ширину експортованого зображення заданою кількістю пікселів.
--height <максимальна висота>
Обмежити висоту експортованого зображення заданою кількістю пікселів.
--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>
Визначити, чи дозволяти збільшення зображення під час експорту. За замовчуванням значення false.
--style <style name>
Specify the name of a style to be applied during export. If a style is specified, the path to the Ansel configuration directory must also be specified (i.e. --core --configdir ~/.config/Ansel). By default no style is applied.
--style-overwrite
Зазначений стиль перезаписує стек історії, а не додається до нього.
--apply-custom-presets <0|1|false|true>
Whether to load data.db which contains presets and styles. Disabling this option allows you to run multiple instances of Ansel-cli at the cost of being unable to use the --style option. Defaults to true.
--out-ext <розширення>
Встановити розширення для вихідних файлів. Якщо вказано, має пріоритет над <вихідним файлом>. За замовчуванням це витягується з <вихідного файлу>. Значенням за замовчуванням є jpg, якщо вказано <вихідна папка> .
--import <файл або каталог>
Вказати вхідний файл або папку, можна використовувати кілька разів. Цей параметр не можна поєднувати з <вхідним файлом або папкою>.
--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
Дозволяє детальний звіт про роботу програми.
--help [опція]
Друкувати довідку про використання та вийти. Якщо вказано опція, додатково друкується довідка про використання для даної опції.
--core <Ansel options>
All command line parameters following --core are passed to the Ansel core and handled as standard parameters. See the Ansel binary section for a detailed description.

опції експорту

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.

використовувати модуль експорту

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.

передати опції в командному рядку

Ви можете встановити будь-який параметр конфігурації формату експорту, використовуючи такий синтаксис:

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

де <FORMAT> – це назва бажаного вихідного формату, а <OPTION> – будь-який параметр конфігурації для цього формату.

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

У наступних розділах описано параметри/значення конфігурації, доступні для кожного формату експорту:

jpeg

quality
Якість стиснення (5 - 100)

j2k (jpg2000)

format
Формат виводу
  • 0: J2K
  • 1: jp2
quality
Якість стиснення (5 - 100)
preset
Режим DCP
  • 0: Cinema2K, 24 FPS
  • 1: Cinema2K, 48 FPS
  • 2: Cinema4K, 24 FPS

exr (OpenEXR)

bpp
Бітова глибина (16 або 32)
compression
Тип стиснення
  • 0: нестиснутий
  • 1: RLE
  • 2: ZIPS
  • 3: ZIP
  • 4: PIZ
  • 5: PXR24
  • 6: B44
  • 7: DWAA
  • 8: DWAB

pdf

title
Заголовок PDF
size
Розмір pdf (A4, A3, Letter, Legal)
orientation
Орієнтація паперу pdf
  • 0: портретна
  • 1: альбомна
border
Порожній простір навколо PDF; формат: розмір (число) + одиниці вимірювання; приклади: 10 мм, 1 дюйм
dpi
Роздільна здатність у точках на дюйм всередині PDF (1 - 5000)
rotate
Чи повертати PDF (0 чи 1)
icc
Чи потрібно вставляти профіль ICC (0 чи 1)
bpp
Бітова глибина (8 або 16)
compression
Чи стискати PDF (0 чи 1)
mode
Режим розміщення зображень у pdf
  • 0: нормальний: просто помістити зображення в pdf
  • 1: чернетка: зображення замінюються рамками
  • 2: debug: рамки навколо сторінки та зображень

pfm

Не передбачено жодних опцій.

png

bpp
Бітова глибина (8 або 16)
compression
Рівень стиснення (0 - 9)

ppm

Не передбачено жодних опцій.

tiff

bpp
Бітова глибина (8, 16, 32)
compress
Тип стиснення
  • 0: без стиснення
  • 1: deflate
  • 2: deflate з предиктором
compresslevel
Рівень стиснення (0 - 9)
shortfile
Ч/Б чи кольорове зображення
  • 0: записувати кольори RGB
  • 1: записувати відтінки сірого

webp

comp_type
Тип стиснення
  • 0: з втратами
  • 1: без втрат
quality
Якість стиснення (5 - 100)
hint
Бажаний спосіб управління стисненням
  • 0: за умовчанням
  • 1: picture: цифрове зображення, портрет
  • 2: photo: фотографія просто неба, з природним освітленням
  • 3: graphic: зображення з дискретними тонами (графіки тощо)

копіювати

Не передбачено жодних опцій.

xcf

bpp
Бітова глибина (8, 16, 32)