Re: How does Pipmak.getimage work?
Status: Alpha
Brought to you by:
cwalther
|
From: Christian W. <cwa...@gm...> - 2010-04-19 17:46:55
|
> Am I correct in assuming that the decompressed image in RAM would be > the same filesize as a BMP version of the same image? Probably. 4 bytes per pixel for an RGBA image, 3 bytes per pixel for an RGB image, plus maybe 100 bytes of header information per image. Pipmak keeps in memory the pixel data of all images that are in use as RGBA node backgrounds (for insideness testing) and hotspot maps, plus the last-used 20 MB worth of pixel data of currently unused images (to speed up loading of already visited nodes). Not all images that are currently being displayed are necessarily kept in memory (by Pipmak at least, your OpenGL driver may do it anyway), since they are displayed from video memory. Pixel data is loaded from disk whenever it is needed and not already in memory. In addition, the Lua-accessible image objects (whether their pixel data is in memory or not) are cached separately until Lua garbage-collects them. -Christian |