Shiny Language Reference

Language Reference > Image Functions


getimageheight

int getimageheight(image ImgVar);

 

Synonyms:

int getimgheight(image ImgVar);

 

 

Returns the height in pixels of the specified image

GETIMAGEHEIGHT returns the width in pixels of an image previously loaded by a call to createimage. If GETIMAGEHEIGHT is given an image variable that has not previously been initialized by createimage it will always return -1.

 

Parameters

ImgVar

The variable declared as type IMAGE to return the height of.

 

Return Value

The height in pixels of the image, or -1 if the specified var type IMAGE parameter has not been initialized.

 

Example Code

// Loads C:\MyBitmap.bmp into MyImage. Note escaped backslash
image MyImage;
bool Result = createimage(MyImage, "C:\\MyBitmap.bmp");

int Height = getimageheight(MyImage);