Image¶

Overview¶

A Draft.Image holds an actual image, along with the image’s width and height, its channel names and a file channel map.

Implementation Details¶

In Draft, the method CreateImage() creates a new image and the method ReadFromFile() reads an image from file. An image can be written to file using the method WriteToFile().

The image’s width and height are stored as properties. You can modify those properties using the method Resize().

To get the image’s channel names, you can use the method GetChannelNames(). You can also manipulate the image’s channels using the methods SetChannel(), HasChannel(), RemoveChannel(), RenameChannel() and SetToColor().

A file channel map is used to specify on write and retrieve on read the bit depth and type of the image channels. It is possible to access the file channel map using the methods SetFileChannelMap() and GetFileChannelMap(). For more details, see the section Image File Channel Map in Concepts.

Beside the bit depth and type of the image channels, other image saving settings can be specified using Draft.ImageInfo. Consult the section ImageInfo in Concepts for more information.