ConversionParametersInput
Conversion parameters for a preset or for one convertImage call. A rule that fails comes back in errors as a ValidationError, keyed by field (e.g. Parameters.TargetSize). A malformed aspectRatio or background fails the whole request instead: no payload comes back, only a top-level error whose message names the field.
ConversionParametersInputFields
The canvas's shape as width:height, each side a whole number from 1 to 100 without leading zeros (e.g. 4:3).
The colour behind transparent areas and padding, as six hex digits without # (e.g. FFFFFF); lower case is stored upper case. Optional with every mode; left out, no background colour is applied.
How to place the original on the canvas.
The file format of the converted image.
Padding on each side as a percentage of targetSize, from 0 to 49. Required with FILL_BACKGROUND and not allowed with the other modes. The canvas minus the padding on both sides must be at least 1 px.
The output quality, from 1 to 100.
The canvas's longer side in pixels, from 1 to 8000.
Was this page helpful?