Interface (CapturePhoto)
CapturePhoto provides APIs for obtaining the objects of the full-quality image and the uncompressed image.
NOTE
The initial APIs of this module are supported since API version 23. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Modules to Import
import { camera } from '@kit.CameraKit';
Properties
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 23.
System capability: SystemCapability.Multimedia.Camera.Core
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| main | ImageType | No | No | Object of the full-quality image and the uncompressed image. |
release
release(): Promise<void>
Releases output resources. This API uses a promise to return the result.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 23.
System capability: SystemCapability.Multimedia.Camera.Core
Return value
| Type | Description |
|---|---|
| Promise<void> | Promise that returns no value. |
Example
import { camera } from '@kit.CameraKit';
async function releaseCapturePhoto(capturePhoto: camera.CapturePhoto): Promise<void> {
await capturePhoto.release();
}
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-oh-camera-capturesession-callbacks
openharmony 鸿蒙 arkts-apis-camera-OIS
openharmony 鸿蒙 capi-oh-camera-camera-devicequeryinfo
openharmony 鸿蒙 capi-oh-camera-camera-frameraterange
openharmony 鸿蒙 capi-oh-camera-camera-outputcapability
openharmony 鸿蒙 arkts-apis-camera-Photo
openharmony 鸿蒙 capi-oh-camera-camera-profile
openharmony 鸿蒙 capi-oh-camera-camera-manager