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

Esta variante no abre ninguna pantalla – funciona en modo de consola puro sin iniciar una GUI. Este modo es particularmente útil para servidores que ejecutan trabajos en segundo plano.

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

El usuario debe proporcionar un nombre de archivo de entrada y un nombre de archivo de salida. Todos los demás parámetros son opcionales.

<input file or folder>
El nombre del archivo o carpeta de entrada (que contiene imágenes) que se exportará. Si desea procesar varias imágenes o varias carpetas, utilice la opción --import en su lugar.
<fichero xmp
El nombre opcional de un archivo sidecar XMP que contiene los datos de la pila de historial que se aplicarán durante la exportación. Si no se proporciona esta opción, Ansel buscará un archivo XMP que pertenezca a los archivos de entrada dados.
<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 <anchura máxima>
Limite el ancho de la imagen exportada al número dado de píxeles.
--height <altura máxima>
Limite la altura de la imagen exportada al número de píxeles especificado.
--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>
Define si permitir la ampliación durante la exportación. El valor predeterminado es falso (false).
--style <nombre de estilo>
Especifique el nombre de un estilo que se aplicará durante la exportación. Si se especifica un estilo, también se debe especificar la ruta al directorio de configuración de Ansel (es decir, por ej., --core --configdir ~/.config/Ansel). De forma predeterminada, no se aplica ningún estilo.
--style-overwrite
El estilo especificado sobrescribe la pila de historial en lugar de agregarse a ella.
--apply-custom-presets <0|1|false|true>
Define si cargar data.db que contiene ajustes preestablecidos y estilos. Deshabilitar esta opción le permite ejecutar múltiples instancias de Ansel-cli a costa de no poder usar la opción --style. Por defecto es verdadero (true).
--out-ext <extensión>
Configure la extensión de salida que se utilizará. Si se especifica tiene prioridad sobre <archivo de salida>. De forma predeterminada, se extrae de <archivo de salida>. El valor predeterminado es jpg si se especifica <carpeta de salida>.
--import <fichero o directorio>
Especifica el archivo o carpeta de entrada; se puede utilizar varias veces. Esta opción no se puede combinar con <archivo o carpeta de entrada>.
--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
Activa la salida con amplia información del proceso.
--help [opción]
Imprime intrucciones de uso y acaba. Si se especifica opción, además imprime el uso de la opción dada.
--core <opciones de Ansel>
Todos los parámetros de la línea de comandos que siguen a --core se pasan al núcleo de Ansel y se manejan como parámetros estándar. Consulte la sección Ansel binary para obtener una descripción detallada.

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 se han proporcionado opciones.

PNG

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

ppm

No se han proporcionado opciones.

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)

copiar

No se han proporcionado opciones.

xcf

bpp
The bit depth (8, 16, 32)