OpenWGA 7.0 - TMLScript reference

ImageScaler
Method :

shrinkToSize(width, height)

On object ImageScaler
Usage Shrinks the image to a maximum size for both dimensions
Description This method automatically determines the biggest possible size of the image where both dimensions are equal or lower than the given parameter sizes while keeping the original aspect ratio. It then enlargens the image to that.Therefor the real target size is in almost all cases smaller on one dimension than the given parameter size.

Use this method to enforce a minimum size on images.

No operation is performed if the image already satisfies the given maximum sizes.
Parameters width (Number):
Maximum width in pixels

height (Number):
Maximum height in pixels
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
    portletevent