4.51.2.3.4. getHeight() | Table of Contents | 4.51.2.3.6. getWidth() |
function getSize:uInt32; virtual;Remarks:
Returns the size of the image as it would take on disk. This includes all header related information (width/height, bitdepth, pixel format, etc), an extra sizeof(uInt32) bytes for storing the complete size, followed by the sprite data. This allows easy indexing of sprites, since you can figure out exactly how much the sprite will take up on disk. This function computes the size in the exact order it is on disk. If the image is 8bpp, then there is a 768 byte palette stored after the sprite data along with an extra sizeof(uInt32) bytes for the palette size in bytes. Currently the entire palette is stored, but in a future revision palette optimization might occur so only used entries are stored.
If you were to store a single sprite in a file, getSize() would equal the filesize.
Returns:Total size of the sprite, or 0 if no sprite data.
See also:4.51.2.3.4. getHeight() | Table of Contents | 4.51.2.3.6. getWidth() |