Skip to main content

Convert an image.

POST 

/image/convert

Convert an image.

Request

Header Parameters

    ipaas string

Bodyrequired

    urlstring

    The image URL

    bufferstring

    The image as a Base64-encoded buffer. Can be specified instead of url.

    outputFormatstringrequired

    The output format of the conversion.

    Possible values: [jpeg, jpg, png, gif, tiff, webp]

    withMetaDataboolean

    Whether the image metadata should be converted, too.

    options object
    qualitynumber

    Quality. Applies to JPEG, PNG, WEBP, TIFF. Default for JPEG, WEBP, TIFF is 80. Default for PNG is 100.

    Possible values: >= 1 and <= 100

    Example: 80
    alphaQualitynumber

    Quality of alpha layer. Applies to WEBP. Default is 100.

    Possible values: >= 0 and <= 100

    Example: 100
    losslessboolean

    Whether to use lossless compression. Applies to WEBP. Default is false.

    Example: false
    nearLosslessboolean

    Whether to use near_lossless compression. Applies to WEBP. Default is false.

    Example: false
    smartSubsampleboolean

    Whether to use high quality chroma subsampling. Applies to WEBP. Default is false.

    Example: false
    progressiveboolean

    Progressive (interlace) scan. Applies to JPEG, PNG, GIF. Default is false.

    Example: false
    chromaSubsamplingstring

    Chroma subsampling settings. 4:4:4 prevents subsampling if quality is at most 90. Applies to JPEG. Default is 4:2:0.

    Possible values: [4:4:4, 4:2:0]

    Example: 4:2:0
    trellisQuanitsationboolean

    Whether to use trellis quantization. Applies to JPEG. Default is false.

    Example: false
    overshootDeringingboolean

    Whether to apply overshoot deringing. Applies to JPEG. Default is false.

    Example: false
    optimiseScansboolean

    Whether to use optimized progressive scans. This enables progressive. Applies to JPEG. Default is false.

    Example: false
    optimizeScansboolean

    Alternative spelling of optimiseScans.

    optimiseCodingboolean

    Whether to use optimized Huffman coding tables. Applies to JPEG. Default is true.

    Example: true
    optimizeCodingboolean

    Alternative spelling of optimiseCoding.

    quanitsationTablenumber

    The quantization table that will be used. Applies to JPEG. Default is 0.

    Possible values: >= 0 and <= 8

    Example: 0
    quantizationTablenumber

    Alternative spelling of quantisationTable.

    Possible values: >= 0 and <= 8

    mozjpegboolean

    Whether to use mozjpeg defaults. Default is false.

    Example: false
    compressionLevelnumber

    The zlib compression level. Applies to PNG. Default is 6.

    Possible values: >= 0 and <= 9

    Example: 6
    adaptiveFilteringboolean

    Whether adaptive row filtering should be used. Applies to PNG. Default is false.

    Example: false
    effortnumber

    CPU effort for compression. For PNG and GIF, 1 is fastest, 10 is slowest, and enables palette. Default is 7. For WEBP, 0 is fastest, 6 is slowest. Default is 4.

    Example: 7
    paletteboolean

    Use a palette-based image with an alpha channel. Applies to PNG. Default is false.

    Example: false
    coloursnumber

    Maximum number of colors in palette. Applies to PNG and GIF. Default is 256.

    Example: 256
    colorsnumber

    Alternative spelling of colours.

    dithernumber

    Level of Floyd-Steinberg error diffusion. Applies to PNG and GIF. Default is 1.0.

    Example: 1
    presetstring

    Preset option. Applies to WEBP. Default is default.

    Possible values: [default, photo, picture, drawing, icon, text]

    Example: default
    compressionstring

    Compression option. Applies to TIFF. Default is jpeg.

    Possible values: [none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k]

    Example: jpeg
    predictorstring

    Compression predictor setting. Applies to TIFF. Default is horizontal.

    Possible values: [none, horizontal, float]

    Example: horizontal
    pyramidboolean

    Write an image pyramid. Applies to TIFF. Default is false.

    Example: false
    tileboolean

    Enable tiling mode. Applies to TIFF. Deault is false.

    Example: false
    tileWidthnumber

    Horizontal tile size. Only applies when tile is true. Applies to TIFF. Default is 256.

    Example: 256
    tileHeightnumber

    Vertical tile size. Only applies when tile is true. Applies to TIFF. Default is 256.

    Example: 256
    xresnumber

    Horizontal resolution in px/mm. Applies to TIFF. Default is 1.0.

    Example: 1
    yresnumber

    Vertical resolution in px/mm. Applies to TIFF. Default is 1.0.

    Example: 1
    bitdepthstring

    Reduce bitdepth. Applies to TIFF. Default is 8.

    Possible values: [1, 2, 4, 8]

    Example: 8
    miniswhiteboolean

    Write 1-bit images as miniswhite. Applies to TIFF. Default is false.

    Example: false
    resolutionUnitstring

    Resolution unit. Applies to TIFF. Default is inch.

    Possible values: [inch, cm]

    Example: inch
    reuseboolean

    Re-use existing palette, otherwise generate new (slow). Applies to GIF. Default is false.

    Example: false
    interFrameMaxErrornumber

    Maximum inter-frame error for transparency. 0 means lossless. Applies to GIF. Default is 0.

    Possible values: >= 0 and <= 32

    Example: 0
    interPaletteMaxErrornumber

    Maximum inter-palette error for palette reuse. Default is 3.

    Possible values: >= 0 and <= 256

    Example: 3
    getAsUrlboolean

    Whether the result image should be returned as a URL. Default is false.

    fileNamestring

    The file name of the result image. Default is a random ID.

Responses

Success

Schema
    urlstringrequired

    The result image URL.