ImageHeight.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>ImageHeight (image handle)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. image handle = variable assigned when the image was loaded
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. 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.
  21. </td>
  22. </tr>
  23. </table>
  24. <h1><a href=../2d_examples/ImageHeight.bb>Example</a></h1>
  25. <table>
  26. <tr>
  27. <td>
  28. ; ImageHeight/ImageWidth Example <br />
  29. <br />
  30. ; Global, as always, for graphics <br />
  31. Global gfxPlayer <br />
  32. <br />
  33. ; Enter graphics mode and start double buffering <br />
  34. Graphics 640,480,16 <br />
  35. SetBuffer BackBuffer() <br />
  36. <br />
  37. ; Load the image-assign the handle to gfxPlayer <br />
  38. gfxPlayer=LoadImage("player.bmp") <br />
  39. <br />
  40. ; Print the image dimensions <br />
  41. Print "The image height is: " + ImageHeight(gfxPlayer) <br />
  42. Print "The image width is: " + ImageWidth(gfxPlayer) <br />
  43. <br />
  44. ; Wait until ESC is pressed so you can see the output <br />
  45. While Not KeyHit(1) <br />
  46. Wend <br />
  47. </td>
  48. </tr>
  49. </table>
  50. <br>
  51. <a target=_top href=../index.htm>Index</a><br>
  52. <br>
  53. 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>
  54. </html>