arsd.image

this file imports all available image decoders, and provides convenient functions to load image regardless of it's format.

Public Imports

arsd.color
public import arsd.color;
Undocumented in source.
arsd.png
public import arsd.png;
Undocumented in source.
arsd.jpeg
public import arsd.jpeg;
Undocumented in source.
arsd.bmp
public import arsd.bmp;
Undocumented in source.
arsd.targa
public import arsd.targa;
Undocumented in source.
arsd.pcx
public import arsd.pcx;
Undocumented in source.
arsd.dds
public import arsd.dds;
Undocumented in source.

Members

Enums

ImageFileFormat
enum ImageFileFormat

Image formats arsd.image can load (except Unknown, of course).

Functions

guessImageFormatFromExtension
ImageFileFormat guessImageFormatFromExtension(const(char)[] filename)

Try to guess image format from file extension.

guessImageFormatFromMemory
ImageFileFormat guessImageFormatFromMemory(const(void)[] membuf)

Try to guess image format by first data bytes.

imageResize
TrueColorImage imageResize(MemoryImage msrcimg, int dstwdt, int dsthgt, const(char)[] filter, float gamma, float filterScale)
TrueColorImage imageResize(MemoryImage msrcimg, int dstwdt, int dsthgt, int filter, float gamma, float filterScale)

Resize image.

imageResize
void imageResize(void delegate(Color[] destrow, int y) srcGetRow, void delegate(int y, const(Color)[] row) dstPutRow, int srcwdt, int srchgt, int dstwdt, int dsthgt, int filter, float gamma, float filterScale)

Resize image. Partial gamma correction looks better on mips; set to 1.0 to disable gamma correction. Filter scale: values < 1.0 cause aliasing, but create sharper looking mips (0.75f, for example).

imageResizeFilterName
string imageResizeFilterName(long idx)

Get filter name. Will return null for invalid index.

imageResizeFindFilter
int imageResizeFindFilter(const(char)[] name, const(char)[] defaultFilter)

Find filter index by name. Will use default filter for invalid names.

loadImageFromFile
MemoryImage loadImageFromFile(T filename)

Try to guess image format from file name and load that image.

loadImageFromMemory
MemoryImage loadImageFromMemory(const(void)[] membuf)

Try to guess image format from data and load that image.

Manifest constants

ImageResizeDefaultFilter
enum ImageResizeDefaultFilter;

Default filter for image resampler.

ImageResizeMaxDimension
enum ImageResizeMaxDimension;

Maximum image width/height for image resampler.

Properties

imageResizeFilterCount
int imageResizeFilterCount [@property getter]

Number of known image resizer filters.

Meta