image handle = variable assigned when the image was loaded |
Use this command and dxImageWidth to return the size of the given image (using the handle assigned when the image was loaded with LoadImage) in pixels. |
; dxImageHeight/dxImageWidth Example ; Global, as always, for graphics Global gfxPlayer ; Enter graphics mode and start double buffering Graphics 640,480,16 dxSetBuffer dxBackBuffer() ; Load the image-assign the handle to gfxPlayer gfxPlayer=LoadImage("player.bmp") ; dxPrint the image dimensions dxPrint "The image height is: " + dxImageHeight(gfxPlayer) dxPrint "The image width is: " + dxImageWidth(gfxPlayer) ; Wait until ESC is pressed so you can see the output While Not dxKeyHit(1) Wend |