X4 Produktdokumentation

Image to Image Converter

This adapter converts and scales an image file to a different image format. The following formats can be read and generated: BMP, JPEG, PNG, and TIFF. The image files are specified in an adapter-specific input XML document. The adapter provides the ability to specify formatting options during conversion.

Properties

Operation

Defines the operation executed by the function adapter

Possible values:

Transformation: Convert image format

Parameters


width

Width of the returned image in pixels (ignored if the maxSize parameter is set)

Possible values:

Any integer

height

Height of the returned image in pixels (ignored if the maxSize parameter is set)

Possible values:

Any integer

maxSize

If you want to scale the image in the original aspect ratio: Maximum width or height of the returned image in pixels (width and height parameters are ignored)

Possible values:

  • Any integer

  • 0: Do not maintain the original aspect ratio and use width and height parameters for scaling (default)

scaleAlgorithm

Scaling algorithm used

Possible values:

  • SCALE_DEFAULT: Use the default algorithm

  • SCALE_FAST: Use fast algorithm

  • SCALE_SMOOTH: Use the anti-aliasing algorithm

  • SCALE_REPLICATE: Use the pixel repetition algorithm

  • SCALE_AREA AVERAGING: Use the algorithm for area average calculation

outputFormat

Output format of the image

Possible values:

  • BMP: Create a Windows bitmap

  • JPEG: Create a JPEG compressed image

  • PNG: Generate a PNG image

  • TIFF: Create an image in TIF format

Status values

1

The operation was successful.

-1

The operation failed due to a technical error.