Skip to content

ScaleImage

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions

Blitz3DBlitzPlusBlitzBasic

ScaleImage

ScaleImage:Void image:Int32, xscale:Float32, yscale:Float32
Parameter Mode Type Default Description
image In Int32 required The image.
xscale In Float32 required Horizontal factor.
yscale In Float32 required Vertical factor.

Description

Scales every frame of an image by a factor: 2 doubles its size, 0.5 halves it, and a negative factor flips the picture, which then extends to the left or up from the handle. The change is permanent, so scale a copy when the original is still needed.

Differences

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Local img = CreateImage(32, 32)
SetBuffer ImageBuffer(img)
Color 255, 160, 0
Rect 0, 0, 32, 32, 1
Color 0, 0, 0
Rect 0, 16, 16, 16, 1
SetBuffer BackBuffer()
Local big = CopyImage(img)
ScaleImage big, 3, 3
Local flip_x = CopyImage(img)
ScaleImage flip_x, -2, 2
Cls
DrawImage img, 20, 100
DrawImage big, 80, 70
DrawImage flip_x, 270, 100
Flip
WaitKey

Media

ScaleImage

Related Commands

CopyImage, CreateImage, DrawImage, FreeImage, GrabImage, HandleImage, LoadAnimImage, LoadImage

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally