Try the following. I have the test.au3 and the images.png file in the same directory. The first part of the program opens the image and displays its height. It then closes the image and reopens it to show its width. It then closes it once more.
#include <GDIPlus.au3>
; Initialize GDI+ library
_GDIPlus_Startup()
$hImage= _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images.png")
MsgBox(0, "test", "Image height is " & _GDIPlus_ImageGetHeight($hImage))
_GDIPlus_ImageDispose($hImage)
$hImage= _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images.png")
MsgBox(0, "test", "Image width is " & _GDIPlus_ImageGetWidth($hImage))
_GDIPlus_ImageDispose($hImage)
test.au3