1# OH_Pixelmap_InitializationOptions 2 3## Overview 4 5The OH_Pixelmap_InitializationOptions struct describes the initialization options encapsulated at the native layer. The struct is used to set the initialization parameters for a PixelMap. 6 7To create an OH_Pixelmap_InitializationOptions object, call [OH_PixelmapInitializationOptions_Create](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_create). 8 9To release an OH_Pixelmap_InitializationOptions object, call [OH_PixelmapInitializationOptions_Release](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_release). 10 11The table below describes the content and operation mode of the OH_Pixelmap_InitializationOptions struct. 12 13| Field type.| Field Name| Field Description|Operation Function| Function Description| 14| -------- | -------- | -------- | -------- | -------- | 15| uint32_t | width | Image width.| [OH_PixelmapInitializationOptions_GetWidth](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_getwidth) |Obtains the image width.| 16| uint32_t | width | Image width.| [OH_PixelmapInitializationOptions_SetWidth](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_setwidth) |Sets the image width.| 17| uint32_t | height | Image height.| [OH_PixelmapInitializationOptions_GetHeight](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_getheight) |Obtains the image height.| 18| uint32_t | height | Image height.| [OH_PixelmapInitializationOptions_SetHeight](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_setheight) |Sets the image height.| 19| int32_t | pixelFormat | Pixel format.| [OH_PixelmapInitializationOptions_GetPixelFormat](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_getpixelformat) |Obtains the pixel format.| 20| int32_t | pixelFormat | Pixel format.| [OH_PixelmapInitializationOptions_SetPixelFormat](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_setpixelformat) |Sets the pixel format.| 21| int32_t | alphaType | Alpha type.| [OH_PixelmapInitializationOptions_GetAlphaType](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_getalphatype) |Obtains the alpha type.| 22| int32_t | alphaType | Alpha type.| [OH_PixelmapInitializationOptions_SetAlphaType](capi-pixelmap-native-h.md#oh_pixelmapinitializationoptions_setalphatype) |Sets the alpha type.| 23 24**Since**: 12 25 26**Related module**: [Image_NativeModule](capi-image-nativemodule.md) 27 28**Header file**: [pixelmap_native.h](capi-pixelmap-native-h.md) 29