CapturePhotoSettings.photoSettingsWithFormat constructor

CapturePhotoSettings.photoSettingsWithFormat(
  1. Map<String, Object> format
)

Creates a photo settings object with the specified output format.

format: A dictionary of Core Video pixel buffer attributes or AVFoundation video settings constants (see Video Settings).

To capture a photo in an uncompressed format, such as 420f, 420v, or BGRA, set the key kCVPixelBufferPixelFormatTypeKey in the format dictionary. The corresponding value must be one of the pixel format identifiers listed in the availablePhotoPixelFormatTypes array of your photo capture output.

To capture a photo in a compressed format, such as JPEG, set the key VideoSettingsKeys.videoCodec in the format dictionary. The corresponding value must be one of the codec identifiers listed in the availablePhotoCodecTypes array of your photo capture output. For a compressed format, you can also specify a compression level with the key AVVideoQualityKey.

Implementation

CapturePhotoSettings.photoSettingsWithFormat(Map<String, Object> format) {
  _channel.$create$photoSettingsWithFormat(
    this,
    $owner: true,
    format: format,
  );
}