photo_native.h
Overview
The file declares the camera photo concepts.
File to include: <ohcamera/photo_native.h>
Library: libohcamera.so
System capability: SystemCapability.Multimedia.Camera.Core
Since: 12
Related module: OH_Camera
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| OH_PhotoNative | OH_PhotoNative | Describes the photo object, which is a full-quality image object. |
Functions
| Name | Description |
|---|---|
| Camera_ErrorCode OH_PhotoNative_GetMainImage(OH_PhotoNative* photo, OH_ImageNative** mainImage) | Obtains a full-quality image. |
| Camera_ErrorCode OH_PhotoNative_GetUncompressedImage(OH_PhotoNative* photo, OH_PictureNative** picture) | Obtains an uncompressed image. |
| Camera_ErrorCode OH_PhotoNative_Release(OH_PhotoNative* photo) | Releases a full-quality image. |
Function Description
OH_PhotoNative_GetMainImage()
Camera_ErrorCode OH_PhotoNative_GetMainImage(OH_PhotoNative* photo, OH_ImageNative** mainImage)
Description
Obtains a full-quality image.
Since: 12
Parameters
| Name | Description |
|---|---|
| OH_PhotoNative* photo | Pointer to an OH_PhotoNative instance. |
| OH_ImageNative** mainImage | Double pointer to the full-quality image, which is an OH_ImageNative instance. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoNative_GetUncompressedImage()
Camera_ErrorCode OH_PhotoNative_GetUncompressedImage(OH_PhotoNative* photo, OH_PictureNative** picture)
Description
Obtains an uncompressed image.
Since: 23
Parameters
| Name | Description |
|---|---|
| OH_PhotoNative* photo | Pointer to an OH_PhotoNative instance. |
| OH_PictureNative** picture | Double pointer to the uncompressed image, which is an OH_PictureNative instance. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |
OH_PhotoNative_Release()
Camera_ErrorCode OH_PhotoNative_Release(OH_PhotoNative* photo)
Description
Releases a full-quality image.
Since: 12
Parameters
| Name | Description |
|---|---|
| OH_PhotoNative* photo | Pointer to the OH_PhotoNative instance to release. |
Returns
| Type | Description |
|---|---|
| Camera_ErrorCode | CAMERA_OK: The operation is successful. CAMERA_INVALID_ARGUMENT: A parameter is missing or the parameter type is incorrect. |