| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>ImageHeight (image handle)</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- image handle = variable assigned when the image was loaded
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Use this command and ImageWidth to return the size of the given image (using the handle assigned when the image was loaded with LoadImage) in pixels.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/ImageHeight.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; ImageHeight/ImageWidth Example
<br />
-
<br />
- ; Global, as always, for graphics
<br />
- Global gfxPlayer
<br />
-
<br />
- ; Enter graphics mode and start double buffering
<br />
- Graphics 640,480,16
<br />
- SetBuffer BackBuffer()
<br />
-
<br />
- ; Load the image-assign the handle to gfxPlayer
<br />
- gfxPlayer=LoadImage("player.bmp")
<br />
-
<br />
- ; Print the image dimensions
<br />
- Print "The image height is: " + ImageHeight(gfxPlayer)
<br />
- Print "The image width is: " + ImageWidth(gfxPlayer)
<br />
-
<br />
- ; Wait until ESC is pressed so you can see the output
<br />
- While Not KeyHit(1)
<br />
- Wend
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=ImageHeight&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|