THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2006 at 10:27, xxxxxxxx wrote:
Bitmaps are nothing more than arrays (?). Although they represent 2D images, the usual storage is a 3D array (width x height x depth). Depth depends upon the color space and other information (RGBA is a depth of four). Width elements are usually Byte-size (but can be larger) and store a color component at each depth level:
0,0
(A)(A)(A)(A) ... (optional)
B B B B ...
G G G G ...
R R R R ...
....
(w-1)x(h-1)
The upper left is the upper-left pixel. Each pixel is desribed with three or four depth values (planes).
That should be all the information you'll ever need - why duplicate it? The C++ and COFFEE SDKs have a BaseBitmap class that will let you get and set the pixel information. Just store your own BaseBitmap pointer for the image and make it available to all of your plugin. Not certain about what you mean by "'everywhere' in Cinema 4D", but you can use your plugin to direct the bitmap information to the Cinema 4D facilities if they are accessible to the SDK (COFFEE is very limited in this respect).
Consider that images can take up oodles of memory space (1024x1024 RGBA = 4MB). In low memory situations, all of that duplication may become critical.