It's a simple object that contains some specifications to create new sprites or images, or to get the information (specs) of a sprite or image, like the canvas size (width/height), color mode, and color space. Often abbreviated as 'spec' in the API.
ImageSpec()
ImageSpec(otherImageSpec)
ImageSpec{
width=number,
height=number,
colorMode=number,
transparentColor=number }Creates a new ImageSpec instance.
When no arguments are given, defaults to a width and height of 1, with the transparent color index set to zero and RGB color mode.
local colorMode = spec.colorMode
spec.colorMode = colorModeGets or sets the color mode of the image or sprite.
local w = spec.width
spec.width = wGets or sets the width of the image or sprite.
local h = spec.height
spec.height = hGets or sets the height of the image or sprite.
local colorSpace = spec.colorSpace
spec.colorSpace = ColorSpace{ sRGB=true }Gets or sets the color space for an image or sprite.
local mask = spec.transparentColor
spec.transparentColor = maskGets or sets the index that refers a transparent color in a palette when the image or sprite uses indexed color mode.