Png

Helper class to quickly create a Png format image.

Constructors

this
this(string file)

Construct the image.

Members

Functions

setAlpha
auto setAlpha(double alpha)

Set the image alpha.

Inherited Members

From Image

embedBase64Data
auto embedBase64Data()

This method embeds the image as a base64 encoded string into the application at compile-time. The path to the image must be passed to the compiler using the -J switch.

blank
auto blank()

Clears the image of all pixel data and effectively makes it transparent.

setData
auto setData(string data)

Specifies the contents of the image as a string. The string should contain binary data or, for some formats, base64-encoded data (this is currently guaranteed to be supported for PNG and GIF images). A set file takes precedence over the setting of data.

getData
string getData()

Get the image data.

setFormat
auto setFormat(string format)

Set the image format. Once set the image only accepts files or data in this format.

getFormat
string getFormat()

Get the image format.

setFile
auto setFile(string file)

Set the image file.

getFile
string getFile()

Get the image file.

setGamma
auto setGamma(double gamma)

Set the image gamma.

getGamma
string getGamma()

Get the current image gamma.

setHeight
auto setHeight(int height)

Set the image height.

getHeight
string getHeight()

Get the current cropped image height.

setPalette
auto setPalette(string palette)

Set the image palette. This setting set how many levels of color/gray are used.

getPalette
string getPalette()

Get the current palette.

setWidth
auto setWidth(int width)

Set the image width.

getWidth
string getWidth()

Get the current cropped image height.

destroy
void destroy()

Destroy this image.

See Also

Meta