pub unsafe extern "C" fn OH_PixelMap_CreatePixelMapWithStride(
env: napi_env,
info: OhosPixelMapCreateOps,
buf: *mut c_void,
len: usize,
rowStride: i32,
res: *mut napi_value,
) -> i32Expand description
@brief Creates a PixelMap object.
@param env Pointer to the NAPI environment. @param info Options for setting the PixelMap object. @param buf Pointer to the buffer of the image. @param len Buffer size. @param rowStride Row stride. The stride is the actual memory size occupied by each row of the image, in bytes. Stride = Width *Number of bytes per pixel + Padding, where padding refers to the extra space added at the end of each row for memory alignment purposes. @param res Pointer to the PixelMap object at the application layer. @return Result code defined in {@link IRNdkErrCode}:
- {@link IMAGE_RESULT_SUCCESS}: The operation is successful.
- {@link IMAGE_RESULT_BAD_PARAMETER}: A parameter is incorrect.
- {@link IMAGE_RESULT_JNI_ENV_ABNORMAL}: The JNI environment is abnormal.
- {@link IMAGE_RESULT_GET_DATA_ABNORMAL}: An error occurs during image data retrieval.
- {@link IMAGE_RESULT_CHECK_FORMAT_ERROR}: The format check fails.
- {@link IMAGE_RESULT_DATA_ABNORMAL}: The image input data is incorrect.
- {@link IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL}: Data in the shared memory is incorrect.
- {@link IMAGE_RESULT_DATA_UNSUPPORT}: The attribute is invalid or the image data is not supported.
- {@link IMAGE_RESULT_UNKNOWN_FORMAT}: The image format is unknown.