format
Convert file to specified format.
parameters
file extension: the extension of file corresponding to the format or
$org
to format to original file formatquality: the quality of file for type which handle it (jpeg, mpeg, png, mng, tiff, miff, bpg, webp…​). It’s a positive integer, usually from 0 (or 1) to 100, the lowest means the lowest quality, the highest means highest quality.
density: resolution of file (Sets an attribute and does not alter the underlying raster image)
density units in dots per centimeter: specifies the density parameter is in dots per centimeter (default is dots per inch)
clipping path2021.6: name, or index (a number from 1 to n, preceeded with an octothorp (#)) of a clipping path to trim image, when converting from jpeg to png by example
Using this option destroys the clipping pathes and therefore prevents clipping in a chain.
outside or inside2021.6: to fill the outside or inside of the clipping path. Default is true (so outside)
JSON object properties
extension: target file extension
quality: quality
density: density
densityCentimeter: specifies the density is in dots per centimer
clippath: clipping path
outside: true for outside or false for inside
simplified syntax parameters
prefix e: target file extension
prefix q: quality
prefix d: density (the horizontal value or the vertical value, or the horizontal value and the vertical value separated by × or x, by exemple 72×72)
prefix hv: density horizontal value (if only hv is specified, vv is equals to hv)
prefix vv: density vertical value (if only vv is specified, hv is equals to vv)
switch dpi: set the density in dots per inch (default)
switch dpc: set the density in dots per centimeter
prefix cp: clipping path
switch outside: +outside for outside or -outside for inside
array type parameters
One value array with extension as target file extension, or only quality (integer), or both values.
string type parameter
The target file extension value.
Example
{
"format":"png"
}
Maldives: W400×H225 |
Maldives: W400×H225 |
Simplified syntax: e_png,c_format
Example with quality
{
"format": {
"extension": "jpg",
"quality": 5
}
}
Simplified syntax: e_jpg,q_5,c_format
to change quality without changing extension, use $current value: e_$current,q_5,c_format