Image

Generic Image class for a given pixel format. Holds a two dimensional array of pixels in a specified format, allowing generic transformations and manipulations using other interfaces.

Constructors

this
this(size_t width, size_t height, size_t channelCount, const ColorSpace* colorSpace, MetaData meta = null)

Create an empty Image given a width and a height. Pixels default to init

this
this(R range, MetaData meta = null)

Create a Image from a given image range, color space and optional metadata.

this
this(const Image other)

Create a image from data copied off another image.

Members

Aliases

Value
alias Value = V

Storage type for each value in a channel.

Functions

newColor
auto newColor()

Create a new color within the color space of the image.

opDollar
auto opDollar()

Get the width and height of the Image.

opIndex
auto opIndex(size_t x, size_t y)
opIndexAssign
void opIndexAssign(const Pixel!Value color, size_t x, size_t y)
void opIndexAssign(real[] values, size_t x, size_t y)

Get a pixel of the given pixel format at a location on the image.

toString
string toString()

Properties

channelCount
auto channelCount [@property getter]

Get the number of channels in the image.

dup
Image dup [@property getter]

Return a copy of the image.

height
auto height [@property getter]

Get the width and height of the Image.

range
auto range [@property getter]

Return a image range for the image.

size
auto size [@property getter]

Get the width and height of the Image.

width
auto width [@property getter]

Get the width and height of the Image.

Variables

meta
MetaData meta;

The metadata of the image.

Meta