ExtendibleBitmap

Proprietary image format for the engine. Mainly created to get around the lack of 16bit indexed image formats. Stores most data in XML, binary is stored after the document. Most data is little endian, future versions might be able to specify big endian data in the binary, but due to the main targets (x86 and ARM) are mainly little endian, it's unlikely.

Constructors

this
this()

Standard constructor for empty files.

this
this(void[] data)

Loads file from a binary.

this
this(string filename)

Loads file from file.

Members

Functions

addBitmap
void addBitmap(void[] data, int x, int y, string bitDepth, string ID, string format, string palette)

Adds a bitmap to the file (any supported formats).

addBitmap
void addBitmap(ushort[] data, int x, int y, string bitDepth, string ID, string format, string palette)

Adds a bitmap to the file (16bit).

addPalette
void addPalette(void[] data, string ID)

Adds a bitmap to the file (4bit, 8bit or 32bit). Adds a palette to the file (32bit only, ARGB).

get16bitBitmap
ushort[] get16bitBitmap(string ID)

Gets the bitmap with the given ID (16bit or 8bit Huffman encoded).

get8bitBitmap
ubyte[] get8bitBitmap(string ID)

Gets the bitmap with the given ID (8bit).

getBitDepth
string getBitDepth(string ID)

Returns the bitdepth of the image.

getBitmap
void[] getBitmap(string ID)

Gets the bitmap with the given ID (all formats).

getBitmap
ubyte[] getBitmap(int n)
Undocumented in source. Be warned that the author may not have intended to support it.
getBitmapRaw
void[] getBitmapRaw(int n)
Undocumented in source. Be warned that the author may not have intended to support it.
getFormat
string getFormat(string ID)

Returns the pixel format of the image.

getIDs
deprecated string[] getIDs()
Undocumented in source. Be warned that the author may not have intended to support it.
getPalette
void[] getPalette(string ID)

Returns the palette with the given ID.

getPaletteMode
string getPaletteMode(string ID)

Returns the palette for the bitmap if exists.

getXsize
int getXsize(string ID)

Returns the X size by ID.

getXsize
int getXsize(int i)

Returns the X size by number.

getYsize
int getYsize(string ID)

Returns the Y size by ID.

getYsize
int getYsize(int i)

Returns the X size by number.

isEmpty
bool isEmpty()

Returns true if file doesn't contain any images.

loadFile
void loadFile()

Loads the file specified in field "filename"

removeBitmap
void removeBitmap(string ID)

Removes the bitmap from the file by ID.

removeBitmap
void removeBitmap(int i)

Removes the bitmap from the file by index.

removePalette
void removePalette(string ID)

Removes the palette with the given ID.

saveFile
void saveFile()

Saves the file to the place specified in field "filename".

saveFile
void saveFile(string f)

Saves the file to the given location.

searchForID
int searchForID(string ID)

Returns the first instance of the ID.

setFileName
void setFileName(string s)

Sets the filename

Properties

dir
string dir [@property getter]

Variables

animData
AnimationData[string] animData;

Stores animation data. See documentation of AnimationData for more information.

bitdepth
string[] bitdepth;

Bitdepth of the given bitmap. Editing this might make the bitmap unusable.

bitmapID
string[] bitmapID;

The ID of the bitmap. Used to identify the bitmaps in the file.

format
string[] format;

Format of the given bitmap. Editing this might make the bitmap unusable or cause graphic corruption.

paletteMode
string[] paletteMode;

Palette of the given bitmap. Null if unindexed, default or the palette's name otherwise.

Meta