stk:image.calculate-dimension(function)

Returns width calculated from new-height, old-width and old-height, or height calculated from new-width, old-width and old-height. If both new-width and new-height are set, new-width is used. This function is normally not used directly.

xs:double?stk:image.calculate-dimension
  1. xs:integer*original-image-size
  2. xs:double?new-width
  3. xs:double?new-height

Examples

Input

<xsl:value-of select="stk:image.calculate-dimension($original-image-size, 400, ())"/>

Parameters

original-image-size
The original image size
Type
xs:integer*
new-width
The requested new image width, which is used for height calculation
Type
xs:double?
new-height
The requested new image height, which is used for width calculation.
Type
xs:double?