ImgGetHeight

Syntax

Height = ImgGetHeight(Img)

Description

Retrieves the height, in pixels, of the specified ProGUI image object.

Parameters

Img
The handle of the ProGUI image object whose height is to be retrieved.

Return Value

Returns the height of the image in pixels (Integer). Returns 0 or #False if the image handle is invalid.

Remarks

This function returns the native pixel height of the base image associated with the handle, regardless of any scaling applied during drawing or the existence of alternative size variants (ImgAddSize()).

Example

IncludeFile "ProGUI_PB.pbi"

StartProGUI()

MyImage = CreateImg(120, 80, RGB(255, 255, 0)) ; Create a 120x80 yellow image

If MyImage
  Height = ImgGetHeight(MyImage)
  Debug "Image Height: " + Str(Height) + " pixels" ; Output: Image Height: 80 pixels

  FreeImg(MyImage)
EndIf

StopProGUI()

See Also

ImgGetWidth, CreateImg, LoadImg

Supported OS

Windows, Linux