Previous: 4.51.2.1.7. getBlitWithMask() To the Table of Contents Next: 4.51.2.1.9. init()
4.51.2.1.7. getBlitWithMask() Table of Contents 4.51.2.1.9. init()

- 4.51.2.1.8. -
Table of Contents
4. Standard Units
4.51. ObjGfx40 - ObjectGraphics 4.0 Unit
4.51.2. ObjGfx40 Unit Object Types
4.51.2.1. ogBlit object
4.51.2.1.8. getSize()


4.51.2.1.8. getSize()

Targets: MS-DOS, Win32 console


ObjGfx40 Unit

Retrieves the size of the blit.

Declaration:
 function getSize:uInt32; virtual;
Remarks:

Returns the size of the blit 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, the blit mask, and the blit data. This allows easy indexing of blits, since you can figure out exactly how much the blit 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 image 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 blit in a file, getSize() would equal the filesize.

Blits can vary in size dramatically, depending on how much "transparent" data was removed from the original region.

Returns:

Total size of the blit, or 0 if no blit data.

See also:







Previous: 4.51.2.1.7. getBlitWithMask() To the Table of Contents Next: 4.51.2.1.9. init()
4.51.2.1.7. getBlitWithMask() Table of Contents 4.51.2.1.9. init()

- 4.51.2.1.8. -