1# drawing_bitmap.h 2 3 4## Overview 5 6The **drawing_bitmap.h** declares the functions related to the bitmap in the drawing module. 7 8**File to include**: <native_drawing/drawing_bitmap.h> 9 10**Library**: libnative_drawing.so 11 12**Since**: 8 13 14**Related module**: [Drawing](_drawing.md) 15 16 17## Summary 18 19 20### Structs 21 22| Name| Description| 23| -------- | -------- | 24| struct [OH_Drawing_BitmapFormat](_o_h___drawing___bitmap_format.md) | Defines the pixel format of a bitmap, including the color type and alpha type.| 25 26 27### Functions 28 29| Name| Description| 30| -------- | -------- | 31| [OH_Drawing_Bitmap](_drawing.md#oh_drawing_bitmap) \* [OH_Drawing_BitmapCreate](_drawing.md#oh_drawing_bitmapcreate) (void) | Creates an **OH_Drawing_Bitmap** object.| 32| void [OH_Drawing_BitmapDestroy](_drawing.md#oh_drawing_bitmapdestroy) ([OH_Drawing_Bitmap](_drawing.md#oh_drawing_bitmap) \*) | Destroys an **OH_Drawing_Bitmap** object and reclaims the memory occupied by the object.| 33| void [OH_Drawing_BitmapBuild](_drawing.md#oh_drawing_bitmapbuild) ([OH_Drawing_Bitmap](_drawing.md#oh_drawing_bitmap) \*, const uint32_t width, const uint32_t height, const [OH_Drawing_BitmapFormat](_o_h___drawing___bitmap_format.md) \*) | Initializes the width and height of a bitmap and sets the pixel format for the bitmap.| 34| uint32_t [OH_Drawing_BitmapGetWidth](_drawing.md#oh_drawing_bitmapgetwidth) ([OH_Drawing_Bitmap](_drawing.md#oh_drawing_bitmap) \*) | Obtains the width of a bitmap.| 35| uint32_t [OH_Drawing_BitmapGetHeight](_drawing.md#oh_drawing_bitmapgetheight) ([OH_Drawing_Bitmap](_drawing.md#oh_drawing_bitmap) \*) | Obtains the height of a bitmap.| 36| void \* [OH_Drawing_BitmapGetPixels](_drawing.md#oh_drawing_bitmapgetpixels) ([OH_Drawing_Bitmap](_drawing.md#oh_drawing_bitmap) \*) | Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap.| 37