Bitmap.bufferForWrite

Function/Meaning
Image buffer pointer (for writing)
Type
Property of Bitmap class (read-only)
Description
Represents a pointer to the top-left corner of the image buffer (a 32bpp bitmap containing color and mask (opacity) information).
This property is provided to offer a means of direct access to the image buffer for plugins and such.
It is returned as an integer type, but in plugins, please cast it to an appropriate type (such as unsigned long *) before use.
Unlike Bitmap.buffer, you can write values to the pointer obtained with this property. Inside Kirikiri, identical images are shared among multiple objects, but accessing this property will break that sharing (copy-on-write).
The image size is represented by the Bitmap.width and Bitmap.height properties.
For the pointer calculation method, please refer to Bitmap.bufferPitch.
Reference
Bitmap.buffer
Bitmap.bufferPitch