Skip to content

ResizeImage

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

Blitz3DBlitzPlusBlitzBasic

ResizeImage

ResizeImage:Void image:Int32, width:Float32, height:Float32
Parameter Mode Type Default Description
image In Int32 required The image.
width In Float32 required New width of a frame in pixels.
height In Float32 required New height of a frame in pixels.

Description

Changes the size of every frame of an image to a new width and height in pixels, stretching the picture. The handle moves with the picture. Resizing again and again loses quality, so keep the original or use CopyImage first.

Differences

  • The picture is stretched with smooth filtering, where the original used simple pixel picking. Edges of resized images are softer.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Local img = CreateImage(40, 40)
SetBuffer ImageBuffer(img)
Color 255, 160, 0
Oval 0, 0, 40, 40, 1
Color 0, 0, 0
Oval 12, 12, 16, 16, 1
SetBuffer BackBuffer()
Local wide = CopyImage(img)
ResizeImage wide, 120, 40
Local tall = CopyImage(img)
ResizeImage tall, 40, 120
Cls
DrawImage img, 20, 100
DrawImage wide, 90, 100
DrawImage tall, 240, 60
Flip
WaitKey

Media

ResizeImage

Related Commands

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

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally