harmony 鸿蒙OhosPixelMapCreateOps

2025-06-12 浏览 (1)

OhosPixelMapCreateOps

Overview

The OhosPixelMapCreateOps struct describes the options used for creating a PixelMap. The parameters need to be initialized.

System capability: SystemCapability.Multimedia.Image

Since: 10

Related module: Image

Header file: image_pixel_map_mdk.h

Summary

Member Variables

NameDescription
uint32_t widthImage width, in pixels.
uint32_t heightImage height, in pixels.
int32_t pixelFormatImage format.
uint32_t editableEditing type of the image.
uint32_t alphaTypeAlpha type of the image.
uint32_t scaleModeScale mode of the image.

Member Variable Description

alphaType

uint32_t OhosPixelMapCreateOps::alphaType

Description

Alpha type of the image. The options are as follows:

ValueDescription
0Unknown alpha type.
1There is no alpha or the image is opaque.
2Premultiplied alpha.
3Unpremultiplied alpha, that is, straight alpha.

editable

uint32_t OhosPixelMapCreateOps::editable

Description

Editing type of the image. The value true means that the image pixel can be edited, and false means the opposite.

height

uint32_t OhosPixelMapCreateOps::height

Description

Image height, in pixels.

pixelFormat

int32_t OhosPixelMapCreateOps::pixelFormat

Description

Image format. The options are as follows:

ValueDescription
0Unknown format.
2RGB_565.
3RGBA_8888.
4BGRA_8888.
5RGB_888.
6ALPHA_8.
7RGBA_F16.
8NV21.
9NV12.

scaleMode

uint32_t OhosPixelMapCreateOps::scaleMode

Description

Scale mode of the image. The options are as follows:

ValueDescription
1The image is scaled in such a way that it fits the dimensions of the target and centered in the target.
0The image size is reduced to fit the dimensions of the target.

width

uint32_t OhosPixelMapCreateOps::width

Description

Image width, in pixels.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Image Kit

harmony 鸿蒙_image___native_module

harmony 鸿蒙Image_Region

harmony 鸿蒙Image_Size

harmony 鸿蒙Image_String

harmony 鸿蒙ImageEffect

harmony 鸿蒙ImageEffect_Any

harmony 鸿蒙ImageEffect_FilterDelegate

harmony 鸿蒙ImageEffect_FilterNames

harmony 鸿蒙ImageEffect_Region

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/NwmFHD