|
ScaleImage | |
ScaleImage ImageNumber, ScaleX, ScaleY, [Mode=1] | |
Parameters: ImageNumber = The Index of the image that you wish to scale ScaleX = Either The X Scalar or the New image Width ScaleY = Either The Y Scalar or the New image height [Mode=1] = The Scale mode to use (0= ScaleX/Y are scalers, 1= absolute sizes (default)) |
|
Returns: NONE | |
ScaleImage allows you to scale an image in two ways. Either via a applying a Scalar to the images current size, or via assigning it an absolute size for this image. Scale Mode Values Mode 0 = (Scaler Mode) Makes ScaleImage use the SCALE X & Y parameters as multipliers of the images current width & height. (ie. NewWidth=OldWidth * ScaleX, NewHeight=OldHeight*ScaleY) MODE 1 = (Absolute Mode) Makes ScaleImage use the SCALE X & Y parameters as the images new size. Mode 2 = (Scaler Mode With Bilinear Filtering) Makes ScaleImage use the SCALE X & Y parameters as multipliers of the images current width & height. The scaling uses bi-linear filtering to help smooth out the re-sized image. MODE 3 = (Absolute Mode With Bilinear Filtering) Makes ScaleImage use the SCALE X & Y parameters as the images new size. The scaling uses bi-linear filtering to help smooth out the re-sized image. FACTS: * WARNING Be VERY careful when choosing your scaling mode. If you accidentally choose scalar mode (mode 0), and apply some large scalar values, you'll most likely make your computer run out of memory ! Possibly even crash it. So BE VERY CAREFUL ! * ScaleImage changes the physical dimensions of the image. Therefore, once you've scaled an image you can't restore to it's original state. We recommend using TextureQuad, DrawRotatedImage or Sprites for real time (none destructive) scaling * ScaleImage only supports images up to 4096x by 4096y pixels. |
|
Example Source: Download This Example
|
Related Info: | FadeImage | LightImage | MirrorImage | RenderPhongImage | RGBmaskImage | ScrollImage | TextureQuad : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |