Interface (Photo)

Photo defines a full-quality image object.

NOTE

  • The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
  • The initial APIs of this interface are supported since API version 11.

Modules to Import

import { camera } from '@kit.CameraKit';

Properties

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

Name Type Read-Only Optional Description
main11+ image.Image No No Full-quality image.

release11+

release(): Promise<void>

Releases output resources. This API uses a promise to return the result.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

Return value

Type Description
Promise<void> Promise that returns no value.

Example

async function releasePhoto(photo: camera.Photo): Promise<void> {
  await photo.release();
}