From MiniScript Wiki
Jump to navigation Jump to search

The Image.create method creates a new Image object filled with solid color. You can then add content to this image with Image.setPixel.


Parameter Name Type Default Value Meaning
width number 64 width of image to create, in pixels
height number 64 height of image to create, in pixels
color color "#000000" color to fill the new image

Usage Notes

This method is called on the Image class itself, rather than on a particular image instance.

Note that another way to create an image at runtime is to draw into a PixelDisplay, and then grab the image with PixelDisplay.getImage.


img = Image.create(10, 10,
gfx.drawImage img, 480, 320