OpenWGA 7.0 - TMLScript reference

ImageScaler
Property :

imageEncodeParam

On object ImageScaler
Usage Sets encoding parameters for that target format of the file
Description This property allows direct access to the encoding params object for the currently chosen output format that the Java Advanced Imaging API will used. You need deeper knowledge of the usage of this API and its "encode" operation.

JAI encoding param objects are special subclasses of the Java object com.sun.media.jai.codec.ImageEncodeParam, which are specific for the chosen output format. They themselves have properties that give access to the individual parameters of that format, for example the compression level of JPEG files.

For simplicity rather use the methods scaler.useJPEGForOutput() or scaler.usePNGForOutput() which will set reasonable defaults for these output formats.

If you just want to set the output quality of the image you may also use scaler.quality instead, which offers an easier interface for the frequently used output formats with such a parameter.
Default value An instance of com.sun.media.jai.codec.JPEGEncodeParam (JPEG encoding params) with a compression level of 0.9
Writable True
Return value JAI Encoding parameter object (Subclass of JAI object com.sun.media.jai.codec.ImageEncodeParam)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
    portletevent