Lines Matching refs:PixelMap

1 # Using PixelMap for PixelMap Operations
3 To process a certain area in an image, you can perform PixelMap operations, which are usually used …
7 **Figure 1** PixelMap operation
9 ![PixelMap operation](figures/bitmap-operation.png)
13 …../../reference/apis-image-kit/js-apis-image.md#pixelmap7) for APIs related to PixelMap operations.
15 1. Complete [image decoding](image-decoding.md) and obtain a **PixelMap** object.
17 2. Obtain information from the **PixelMap** object.
21 // Obtain the total number of bytes of this PixelMap object.
23 // Obtain the number of bytes per row of this PixelMap object.
25 …// Obtain the pixel density of this PixelMap object. Pixel density refers to the number of pixels …
32 …> To prevent issues with the PixelMap due to inconsistent pixel formats, you are advised to use **…
37 …// Read the pixel data of the PixelMap based on the PixelMap's pixel format and write the data to …
44 …Read the pixel data in the buffer based on the PixelMap's pixel format and write the data to the P…
52 …// Read the pixel data in the area specified by PositionArea.region in the PixelMap in the BGRA_88…
64 …e BGRA_8888 format and write the data to the area specified by PositionArea.region in the PixelMap.
72 ## Development Example: Cloning (Deep Copying) a PixelMap
74 1. Complete [image decoding](image-decoding.md) and obtain a **PixelMap** object.
76 2. Clone (deep copy) this **PixelMap** object to obtain a new PixelMap.
79 …> When creating a PixelMap, you must set **srcPixelFormat** to the pixel format of the original Pi…
83 * Clone (deep copy) a PixelMap.
85 * @param pixelMap - PixelMap to clone.
86 …Format - Pixel format of the new PixelMap. If this parameter is not specified, the pixel format of…
87 * @return Returns a new PixelMap.
89 clonePixelMap(pixelMap: PixelMap, desiredPixelFormat?: image.PixelMapFormat): PixelMap {
90 // Obtain the image information of the current PixelMap.
92 …// Read the pixel data of the PixelMap and write the data to a buffer array based on the PixelMap'…
95 // Generate initialization options based on the image information of the current PixelMap.
97 // Pixel format of the current PixelMap.
99 // Pixel format of the new PixelMap.
101 // Size of the current PixelMap.
104 // Generate a new PixelMap based on the initialization options and buffer array.