| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>ResizeImage image,width#,height#</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- image = file handle for previously loaded image
<br />
- width# = new width in pixels
<br />
- height# = new height in pixels
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Similar to ScaleImage, but uses pixel values instead of percentages. Use this command to resize an image previously loaded with LoadImage or LoadAnimImage.
<br />
-
<br />
- This is NOT intended for REAL TIME scaling of images! Precalculate your images before running your program, or you will likely see massively slow renderings of graphics.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/ResizeImage.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; ResizeImage example
<br />
-
<br />
- ; Set Graphics Mode
<br />
- Graphics 800,600,16
<br />
-
<br />
- ; Randomize the random seed
<br />
- SeedRnd MilliSecs()
<br />
-
<br />
- ; Load an image to tile (your location might vary)
<br />
- gfxBall=LoadImage("C:Program FilesBlitz Basicsamplesall.bmp")
<br />
-
<br />
- ; Size it randomly from 300 to -300 both x and y
<br />
- ResizeImage gfxBall,Rnd(-300,300),Rnd(-300,300)
<br />
-
<br />
- ; Wait for ESC to hit
<br />
- While Not KeyHit(1)
<br />
- DrawImage gfxball,Rnd(800),Rnd(600)
<br />
- VWait
<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=ResizeImage&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|