ImageSmooth
ImageSmooth (Statement)
Format
imagesmooth on
Description
Turns smoothing on or off for image transformations performed afterwards. When on is true, operations that scale or rotate an image use smooth (anti-aliased, bilinear) sampling; when false, they use fast nearest-neighbor sampling, which is quicker and keeps hard pixel edges.
This one setting affects ImageResize, ImageRotate, ImageCentered, ImageTransformed, and the scaled form of ImageDraw. It stays in effect until changed again.
Example
imagesmooth false # keep pixel art crisp when scaling
a = imageload("pixels.png")
imageresize a, 4.0
imagedraw a, 0, 0
See Also
ImageAutoCrop, ImageCentered, ImageCopy, ImageCrop, ImageDraw, ImageFlip, ImageHeight, ImageLoad, ImageNew, ImagePixel, ImageResize, ImageRotate, ImageSetPixel, ImageSmooth, ImageTransformed, ImageWidth, Unload
Availability
BASIC-256 2.0 and later. Documented from the BASIC-256 v2.1 continuation project.