Help Center

GdipGetImageHeightfunction

Gets the image height, in pixels, of an image.

Graphicsfunctiondocumented

Syntax

FUNCTION GdipGetImageHeight (BYVAL image AS GpImage PTR, BYVAL nHeight AS UINT) AS GpStatus

Parameters

NameDescription
image[in] Pointer to the Image object.
nHeight[out] Pointer to a variable that receives the height, in pixels, of this image.

Description

Gets the height, in pixels, of an image.

Examples

DIM hStatus AS LONG

' // Initialize GDI+ DIM token AS ULONG_PTR = AfxGdipInit

' // Load the original image from file DIM image AS GpImage PTR hStatus = GdipLoadImageFromFile("climber.jpg", @image)

' // Get the height of the image DIM nHeight AS UINT hStatus = GdipGetImageHeight(image, @nHeight) PRINT "Image height: " & WSTR(nHeight)

' // Cleanup IF image THEN GdipDisposeImage(image)

' // Shutdown GDI+ AfxGdipShutdown token

PRINT PRINT "Press any key" SLEEP

The following example retrieves the height, in pixels, of an image.

Reference

  • Defined in AfxNova/AfxGdiPlus.bi:2091
  • Documented in Graphics/GdiPlus Flat Api/GdiPlusImage.md
  • Topic: Image Functions