# Function Reference

# _GDIPlus_ImageGetVerticalResolution

Returns vertical resolution in DPI (pixels per inch) of an image

#include <GDIPlus.au3>
_GDIPlus_ImageGetVerticalResolution ( $hImage )

## Parameters

$hImage | Handle to an image object

## Return Value

Success: | an integer of DPI (pixels per inch).
Failure: | 0 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GDIP_ERR* see GPIPlusConstants.au3).
@error: | 11 - Invalid DPI. 10 - Invalid image handle.

## Related

_GDIPlus_ImageGetHorizontalResolution

## See Also

Search GdipGetImageVerticalResolution in MSDN Library.

## Example

    #include "Extras\HelpFileInternals.au3"

    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <ScreenCapture.au3>
    #include <WinAPIHObj.au3>
    #include <WindowsStylesConstants.au3>

    Example()

    Func Example()
        Local $hBitmap, $hImage

        ; Create GUI
        GUICreate("GDI+", 600, 400)
        _MemoCreate(2, 2, 596, 396, $WS_VSCROLL)
        GUISetState(@SW_SHOW)

        ; Initialize GDI+ library
        _GDIPlus_Startup()

        ; Capture 32 bit bitmap
        $hBitmap = _ScreenCapture_Capture("")
        $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap)

        ; Show vertical resolution in DPI (dots per inch) of image
        _MemoWrite("VerticalResolution DPI : " & _GDIPlus_ImageGetVerticalResolution($hImage)) ;

        ; Clean up resources
        _GDIPlus_ImageDispose($hImage)
        _WinAPI_DeleteObject($hBitmap)

        ; Shut down GDI+ library
        _GDIPlus_Shutdown()

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
    EndFunc   ;==>Example