pub unsafe extern "C" fn OH_ImageSource_CreatePixelMap(
native: *const ImageSourceNative,
ops: *mut OhosImageDecodingOps,
res: *mut napi_value,
) -> i32Expand description
@brief Decodes an ImageSource object to obtain a PixelMap object at the JavaScript native layer based on the specified {@link OhosImageDecodingOps} struct.
@param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer. @param ops Indicates a pointer to the options for decoding the image source. For details, see {@link OhosImageDecodingOps}. @param res Indicates a pointer to the PixelMap object obtained at the JavaScript native layer. @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful. returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter. returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment. returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error. returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail. returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error. returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed. returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_ENCODER_FAILED - if create encoder failed. returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed. returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error. returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error. returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error. returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal. returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error. returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error. returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error. returns {@link IRNdkErrCode} IMAGE_RESULT_INIT_ABNORMAL - if image input data error. returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error. returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format. returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail. returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail. returns {@link IRNdkErrCode} IMAGE_RESULT_ENCODE_FAILED - if image add pixel map fail. returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_UNSUPPORT - if image hardware decode unsupported. returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_FAILED - if hard decode failed. returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_IPC - if ipc error. returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index. returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed. returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed. @see {@link ImageSourceNative}, {@link OhosImageDecodingOps}
@syscap SystemCapability.Multimedia.Image @since 10 @version 4.0