Category: 2D Overlay
Syntax:
b2dSetImageSmooth:Void(imageHandle:Int, smooth:Int)
Void
Chooses whether an image is smoothed or kept sharp when it's drawn scaled.
Images are smoothed (bilinear filtering) when drawn larger or smaller than their size, which suits photos and artwork. Call b2dSetImageSmooth(image, False) to keep each pixel a sharp square instead, for pixel art, retro screens and emulators. True puts the smoothing back. It only changes how the image is drawn, not its pixels.
Images drawn with a custom image shader keep that shader's own sampling.
View detailed documentation online
Local img:Int = b2dLoadImage("hero.png")
b2dSetImageSmooth(img, False) ; crisp when drawn 4x
b2dDrawImageQuad(img, 0, 0, 128, 0, 128, 128, 0, 128)
BambooBasic © 2026 Michael Denathorn