ae.utils.graphics.image

In-memory images and various image formats.

Public Imports

ae.utils.graphics.view
public import ae.utils.graphics.view;

Members

Aliases

ElementViewImage
alias ElementViewImage(R) = ViewImage!(ElementType!R)
Undocumented in source.
GetInputColor
alias GetInputColor(COLOR, INPUT) = Select!(is(COLOR == InputColor), INPUT, COLOR)
Undocumented in source.
ViewImage
alias ViewImage(V) = Image!(ViewColor!V)
Undocumented in source.

Enums

isTargetColor
eponymoustemplate isTargetColor(C, TARGET)
Undocumented in source.

Functions

copy
auto copy(SRC src, TARGET target)

Copy the given view into the specified target.

copy
auto copy(SRC src)

Copy the given view into a newly-allocated image.

copyPixels
void copyPixels(SRC src, COLOR[] dst)

Copy a view's pixels (top-to-bottom) to a COLOR buffer.

copyScanline
void copyScanline(SRC src, int y, COLOR[] dst)

Copy the indicated row of src to a COLOR buffer.

fromPixels
auto fromPixels(INPUT[] input, uint w, uint h, TARGET target)
auto fromPixels(INPUT[] input, uint w, uint h)

Loads a raw COLOR[] into an image of the indicated size.

hjoin
auto hjoin(R images, TARGET target)
auto hjoin(R images)

Splice multiple images horizontally.

parseBMP
auto parseBMP(const(void)[] data)

Parses a Windows bitmap (.bmp) file.

parseBMP
auto parseBMP(const(void)[] data, TARGET target)

Parses a Windows bitmap (.bmp) file.

parsePBM
auto parsePBM(const(void)[] vdata, TARGET target)
auto parsePBM(const(void)[] vdata)

Parses a binary Netpbm monochrome (.pgm) or RGB (.ppm) file.

toBMP
ubyte[] toBMP(SRC src)

Creates a Windows bitmap (.bmp) file.

toPBM
ubyte[] toPBM(SRC src)

Creates a binary Netpbm monochrome (.pgm) or RGB (.ppm) file.

toPNG
ubyte[] toPNG(SRC src)

Creates a PNG file. Only basic PNG features are supported (no filters, interlacing, palettes etc.)

toRef
ImageRef!(ViewColor!SRC) toRef(SRC src)

Convert a direct view to an ImageRef. Assumes that the rows are evenly spaced.

vjoin
auto vjoin(R images, TARGET target)
auto vjoin(R images)

Splice multiple images vertically.

Properties

bitmapPixelStride
int bitmapPixelStride [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Image
struct Image(COLOR)

An in-memory image. Pixels are stored in a flat array.

ImageRef
struct ImageRef(COLOR)

Represents a reference to COLOR data already existing elsewhere in memory. Assumes that pixels are stored row-by-row, with a known distance between each row.

InputColor
struct InputColor
Undocumented in source.
TargetColor
struct TargetColor
Undocumented in source.

Templates

bitmapBitCount
template bitmapBitCount(COLOR)
Undocumented in source.
downscale
template downscale(int HRX, int HRY = HRX)

Performs linear downscale by a constant factor

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>