< Previous | Contents | Next >
The Image function’s only argument is a table of attributes which describe the images width, height, color depth, and so forth. In the majority of cases the width, height, aspect depth and other attributes of the new image should exactly match those of another image already in memory. In that case the attribute table would be as simple as
local out = Image({IMG_Like=image}
There are occasionally times when it will be necessary to specify one or more of the values explicitly, instead of taking them from another image input. For example, if we wanted to create an image exactly like the image src_image, but with a different color depth, we might use :
local out = Image({IMG_Like = img, IMG_Depth = src_depth})
In a source tool like the native Background tool or the Plasma tool, it is usually necessary to specify all of the Image attributes.