Skip to main content

OH_PixelMap_GetImageInfo

Function OH_PixelMap_GetImageInfo 

Source
pub unsafe extern "C" fn OH_PixelMap_GetImageInfo(
    native: *const NativePixelMap,
    info: *mut OhosPixelMapInfos,
) -> i32
Expand description

@brief Obtains the image information of a NativePixelMap object.

@param native Pointer to a NativePixelMap object. @param info Pointer to the image information. @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_INVALID_PARAMETER}: A parameter is invalid.
  • {@link IMAGE_RESULT_GET_DATA_ABNORMAL}: An error occurs during image data retrieval.
  • {@link IMAGE_RESULT_DECODE_FAILED}: Decoding fails.
  • {@link IMAGE_RESULT_CHECK_FORMAT_ERROR}: The format check fails.
  • {@link IMAGE_RESULT_THIRDPART_SKIA_ERROR}: Skia decoding fails.
  • {@link IMAGE_RESULT_DATA_ABNORMAL}: The image input data is incorrect.
  • {@link IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST}: Sharing the memory fails.
  • {@link IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL}: Data in the shared memory is incorrect.
  • {@link IMAGE_RESULT_MALLOC_ABNORMAL}: An error occurs during memory allocation.
  • {@link IMAGE_RESULT_DATA_UNSUPPORT}: The attribute is invalid or the image data is not supported.
  • {@link IMAGE_RESULT_CROP}: Cropping fails.
  • {@link IMAGE_RESULT_UNKNOWN_FORMAT}: The image format is unknown.
  • {@link IMAGE_RESULT_PLUGIN_REGISTER_FAILED}: The plugin fails to be registered.
  • {@link IMAGE_RESULT_PLUGIN_CREATE_FAILED}: The plugin fails to be created.
  • {@link IMAGE_RESULT_ALPHA_TYPE_ERROR}: The alpha type is incorrect.
  • {@link IMAGE_RESULT_ALLOCATER_TYPE_ERROR}: The memory allocator type is incorrect.
@see OhosPixelMapInfos @since 10 @version 2.0