OwnedImage

Manually managed image.

Constructors

this
this()

Create empty and with no size.

this
this(int w, int h, int border, int rowAlignment, int xMultiplicity, int trailingSamples)

Create with given initial size.

this
this(int w, int h, ubyte* buffer)

Create from already loaded dense RGBA pixel data. buffer should be allocated with alignedMalloc/alignedRealloc with an alignment of 1. Ownership of buffer is given to the OwnedImage.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

borderBottom
int borderBottom()
borderLeft
int borderLeft()
borderRight
int borderRight()
borderTop
int borderTop()
fillWith
void fillWith(COLOR fill)

Fills the whole image, border included, with a single color value.

isGapless
bool isGapless()
pitchInBytes
int pitchInBytes()
replicateBorders
void replicateBorders()

Fill the borders by taking the nearest existing pixel in the meaningful area.

replicateBordersTouching
void replicateBordersTouching(box2i updatedRect)

Fill the borders _touching updatedRect_ by taking the nearest existing pixel in the meaningful area.

scanline
COLOR[] scanline(int y)
scanlinePtr
COLOR* scanlinePtr(int y)
size
void size(int width, int height, int border, int rowAlignment, int xMultiplicity, int trailingSamples)

Resize the image, the content is lost and the new content is undefined.

Mixins

__anonymous
mixin DirectView
Undocumented in source.

Variables

h
int h;

Height of the meaningful area. Public in order to be an Image.

w
int w;

Width of the meaningful area. Public in order to be an Image.

Mixed In Members

From mixin DirectView

COLOR
alias COLOR = typeof(scanline(0)[0])
Undocumented in source.
opIndex
COLOR opIndex(int x, int y)

Implements the view[x, y] operator.

opIndexAssign
COLOR opIndexAssign(COLOR value, int x, int y)

Implements the view[x, y] = c operator.

Meta