getImageHeight

int sutil.getImageHeight ( String imagePath ) (enterprise edition only)

Description

Get the height of an image.

Parameters

  • imagePath File path to the image, as a string.

Return Values

Returns the height in pixels of the image file, as an integer. If the file doesn't exist or is not an image an error will be thrown and -1 will be returned.

Change Log

Version Description
5.0 Moved from session to sutil.
4.5 Available for enterprise edition.

Examples

Write Image Height to Log

 // Output the height of the image to the log.
 session.log( "Image height: " + sutil.getImageHeight( "C:/my_image.jpg" ) );