SaveImage.htm 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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>SaveImage (image,bmpfile$[,frame] )</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. image = variable handle to the image to save <br />
  13. bmpfile$ = string with full path and filename to save to <br />
  14. frame = optional; which frame of the image to save
  15. </td>
  16. </tr>
  17. </table>
  18. <h1>Description</h1>
  19. <table>
  20. <tr>
  21. <td>
  22. Saves an image or one of its frames to hard drive. You will need an image in memory to save. This returns a 1 if the save was successful, 0 if not.
  23. </td>
  24. </tr>
  25. </table>
  26. <h1><a href=../2d_examples/SaveImage.bb>Example</a></h1>
  27. <table>
  28. <tr>
  29. <td>
  30. ; SaveImage example <br />
  31. <br />
  32. ; Set Graphics Mode <br />
  33. Graphics 800,600,16 <br />
  34. <br />
  35. ; Load an image to tile (your location might vary) <br />
  36. gfxBall=LoadImage("C:Program Files\Blitz Basic\samples\ball.bmp") <br />
  37. <br />
  38. ; Save the image to the c: drive ... <br />
  39. ok=SaveImage (gfxBall,"c: <br />
  40. ewball.bmp") <br />
  41. <br />
  42. ; Print results <br />
  43. If ok=1 Then <br />
  44. Print "Save successful!" <br />
  45. Else <br />
  46. Print "There was an error saving!" <br />
  47. End If <br />
  48. <br />
  49. ; Wait for ESC to hit <br />
  50. While Not KeyHit(1) <br />
  51. Wend
  52. </td>
  53. </tr>
  54. </table>
  55. <br>
  56. <a target=_top href=../index.htm>Index</a><br>
  57. <br>
  58. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=SaveImage&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  59. </html>