Image

Image abstraction type.

Constructors

this
this(in Image copy, bool deepCopy = false)

Copy constructor.

this
this(size_t width, size_t height, ImageFormat format = ImageFormat.IF_RGB, BitDepth depth = BitDepth.BD_8, ubyte[] data = null)

Construct an image by given size, format and bit depth information.

Members

Functions

asType
auto asType()

Convert image data type to given type.

data
auto data()

Get data array from this image.

isOfType
bool isOfType()

Check if this images data corresponds to given value type.

Properties

byteSize
auto byteSize [@property getter]

Number of bytes contained in the image.

channels
auto channels [@property getter]

Channel count of the image.

depth
auto depth [@property getter]

Get bit depth of the image.

empty
auto empty [@property getter]

Check if image is empty (there's no data present).

format
auto format [@property getter]

Get format of an image.

height
auto height [@property getter]

Get height of an image.

pixelSize
auto pixelSize [@property getter]

Number of bytes contained in one pixel of the image.

rowStride
auto rowStride [@property getter]

Number of bytes contained in one row of the image.

size
size_t[3] size [@property getter]

Size of the image. Returns an array of 3 sizes: [width, height, channels]

width
auto width [@property getter]

Get height of an image.

Meta