285
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Live Photo, RAW, and Wide Color Capture with AV Foundation Media #WWDC16 Session 501 Advances in iOS Photography Brad Ford Apple

Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Live Photo, RAW, and Wide Color Capture with AV Foundation

Media #WWDC16

Session 501

Advances in iOS Photography

Brad Ford Apple

Page 2: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 3: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 4: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

developer.apple.comPast Sessions

What’s New In Camera Capture (iOS 6) WWDC 2012

What’s New In Camera Capture (iOS 7) WWDC 2013

Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014

Page 5: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

Page 6: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

New AVCaptureOutput

Page 7: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

New AVCaptureOutputNew photography-driven features in iOS 10!

Page 8: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

New AVCaptureOutputNew photography-driven features in iOS 10!• Live Photos

Page 9: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

New AVCaptureOutputNew photography-driven features in iOS 10!• Live Photos• RAW and DNG

Page 10: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

New AVCaptureOutputNew photography-driven features in iOS 10!• Live Photos• RAW and DNG• Preview (Thumbnail) images

Page 11: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Agenda

New AVCaptureOutputNew photography-driven features in iOS 10!• Live Photos• RAW and DNG• Preview (Thumbnail) images• Wide Color

Page 12: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

Page 13: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureSession

Page 14: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureSession

Page 15: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureMovieFileOutput

AVCaptureSession

AVCaptureStillImageOutput

Page 16: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureMovieFileOutput

AVCaptureConnection AVCaptureConnection

AVCaptureSession

AVCaptureStillImageOutput

Page 17: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureMovieFileOutput

AVCaptureConnection AVCaptureConnection

AVCaptureSession

AVCaptureStillImageOutput

Page 18: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureMovieFileOutput

AVCaptureConnection AVCaptureConnection

AVCaptureSession

Page 19: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureConnection AVCaptureConnection

AVCaptureMovieFileOutput

AVCaptureSession

Page 20: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Review: AV Foundation Capture Objects

AVCaptureDeviceInput

AVCaptureDevice (Camera)

AVCaptureConnection AVCaptureConnection

AVCaptureMovieFileOutput

AVCaptureSession

AVCapturePhotoOutput

NEW

Page 21: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

NEWAVCapturePhotoOutput Design Features

Page 22: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

NEWAVCapturePhotoOutput Design Features

Functional programming model

Page 23: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

NEWAVCapturePhotoOutput Design Features

Functional programming modelPhoto settings encapsulation

Page 24: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

NEWAVCapturePhotoOutput Design Features

Functional programming modelPhoto settings encapsulationA delegate-style interface for tracking the progress of photo capture requests

Page 25: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

NEWAVCapturePhotoOutput Design Features

Functional programming modelPhoto settings encapsulationA delegate-style interface for tracking the progress of photo capture requestsResolving of photo settings to an immutable object

Page 26: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Using AVCapturePhotoOutput

AVCapturePhotoOutput

Read-only properties

Feature opt-in properties

Methods

NEW

Page 27: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Using AVCapturePhotoOutput

AVCapturePhotoOutput

Read-only properties

Feature opt-in properties

Methods

isLivePhotoCaptureSupportedavailablePhotoPixelFormatTypes

availablePhotoCodecTypes

NEW

Page 28: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Using AVCapturePhotoOutput

AVCapturePhotoOutput

Read-only properties

Feature opt-in properties

Methods

isLivePhotoCaptureSupportedavailablePhotoPixelFormatTypes

availablePhotoCodecTypes

isHighResolutionCaptureEnabledisLivePhotoCaptureEnabled

NEW

Page 29: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Using AVCapturePhotoOutput

AVCapturePhotoOutput

Read-only properties

Feature opt-in properties

Methods

isLivePhotoCaptureSupportedavailablePhotoPixelFormatTypes

availablePhotoCodecTypes

isHighResolutionCaptureEnabledisLivePhotoCaptureEnabled

capturePhoto(with:, delegate:)

NEW

Page 30: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput

Using AVCapturePhotoOutput NEW

Page 31: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput

Using AVCapturePhotoOutput NEW

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 32: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput

Using AVCapturePhotoOutput NEW

-capturePhoto(with:, AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 33: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput

Using AVCapturePhotoOutput NEW

-capturePhoto(with:,

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 34: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput

Using AVCapturePhotoOutput NEW

-capturePhoto(with:,

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

delegate:)

Page 35: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 36: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 37: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

Atomic

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 38: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

AtomicUnique

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 39: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

AtomicUniqueYour order form copy

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 40: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 41: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

Single set of callbacks per photo settings AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 42: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

Single set of callbacks per photo settingsOrdering is documented

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 43: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoSettings

Single set of callbacks per photo settingsOrdering is documentedVehicle for resolving indeterminate settings

AVCapturePhotoCaptureDelegatephotoEventAHappenedphotoEventBHappenedphotoEventCHappened

AVCapturePhotoSettingsFeatureXFeatureYFeatureZ

Page 44: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Usage

Time

Page 45: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Usage

Time

capturePhoto(with:delegate:

flashMode = .auto, autoSIS = trueAVCapturePhotoCaptureDelegate

Page 46: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

Page 47: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettingsflash = On, SIS = Off

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

willBeginCaptureForResolvedSettings

Page 48: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettingsflash = On, SIS = Off

AVCaptureResolvedPhotoSettingsflash = On, SIS = Off

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

willBeginCaptureForResolvedSettings

flashMode = .auto, autoSIS = true

Page 49: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

willCapturePhotoForResolvedSettings

Page 50: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

didCapturePhotoForResolvedSettings

Page 51: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

CMSampleBuffer

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

didFinishProcessingPhotoSampleBuffer

Page 52: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Usage

Time

flashMode = .auto, autoSIS = true

AVCapturePhotoCaptureDelegate

didFinishCaptureForResolvedSettings

Page 53: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Specifics

Page 54: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Specifics

Delegate callbacks track a single photo capture request

Page 55: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Specifics

Delegate callbacks track a single photo capture requestAVCapturePhotoOutput holds a weak reference to your delegate

Page 56: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Specifics

Delegate callbacks track a single photo capture requestAVCapturePhotoOutput holds a weak reference to your delegateAll callbacks are marked @optional

Page 57: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Specifics

Delegate callbacks track a single photo capture requestAVCapturePhotoOutput holds a weak reference to your delegateAll callbacks are marked @optionalSome callbacks are required at runtime depending on your photo settings

Page 58: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Specifics

Delegate callbacks track a single photo capture requestAVCapturePhotoOutput holds a weak reference to your delegateAll callbacks are marked @optionalSome callbacks are required at runtime depending on your photo settingsAll callbacks pass an instance of AVCaptureResolvedPhotoSettings

Page 59: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Initiating a photo capture using AVCapturePhotoOutput

func takeHighResolutionPhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true photoOutput.capturePhoto(with: settings, delegate: self) }

func takeFlashPhoto() { let settings = AVCapturePhotoSettings() settings.flashMode = .auto

photoOutput.capturePhoto(with: settings, delegate: self) }

func takeBGRAPhoto() { let bgraFormat: [String : AnyObject] = [kCVPixelBufferPixelFormatTypeKey as String : NSNumber(value: kCVPixelFormatType_32BGRA)] let settings = AVCapturePhotoSettings(format: bgraFormat) photoOutput.capturePhoto(with: settings, delegate: self) }

Page 60: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Initiating a photo capture using AVCapturePhotoOutput

func takeHighResolutionPhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true photoOutput.capturePhoto(with: settings, delegate: self) }

func takeFlashPhoto() { let settings = AVCapturePhotoSettings() settings.flashMode = .auto

photoOutput.capturePhoto(with: settings, delegate: self) }

func takeBGRAPhoto() { let bgraFormat: [String : AnyObject] = [kCVPixelBufferPixelFormatTypeKey as String : NSNumber(value: kCVPixelFormatType_32BGRA)] let settings = AVCapturePhotoSettings(format: bgraFormat) photoOutput.capturePhoto(with: settings, delegate: self) }

Page 61: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Initiating a photo capture using AVCapturePhotoOutput

func takeHighResolutionPhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true photoOutput.capturePhoto(with: settings, delegate: self) }

func takeFlashPhoto() { let settings = AVCapturePhotoSettings() settings.flashMode = .auto

photoOutput.capturePhoto(with: settings, delegate: self) }

func takeBGRAPhoto() { let bgraFormat: [String : AnyObject] = [kCVPixelBufferPixelFormatTypeKey as String : NSNumber(value: kCVPixelFormatType_32BGRA)] let settings = AVCapturePhotoSettings(format: bgraFormat) photoOutput.capturePhoto(with: settings, delegate: self) }

Page 62: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Initiating a photo capture using AVCapturePhotoOutput

func takeHighResolutionPhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true photoOutput.capturePhoto(with: settings, delegate: self) }

func takeFlashPhoto() { let settings = AVCapturePhotoSettings() settings.flashMode = .auto

photoOutput.capturePhoto(with: settings, delegate: self) }

func takeBGRAPhoto() { let bgraFormat: [String : AnyObject] = [kCVPixelBufferPixelFormatTypeKey as String : NSNumber(value: kCVPixelFormatType_32BGRA)] let settings = AVCapturePhotoSettings(format: bgraFormat) photoOutput.capturePhoto(with: settings, delegate: self) }

Page 63: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettings Properties

Page 64: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettings Properties

public var uniqueID: Int64 { get }

Page 65: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettings Properties

public var uniqueID: Int64 { get }public var photoDimensions: CMVideoDimensions { get }

Page 66: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettings Properties

public var uniqueID: Int64 { get }public var photoDimensions: CMVideoDimensions { get }public var isFlashEnabled: Bool { get }

Page 67: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCaptureResolvedPhotoSettings Properties

public var uniqueID: Int64 { get }public var photoDimensions: CMVideoDimensions { get }public var isFlashEnabled: Bool { get }public var isStillImageStabilizationEnabled: Bool { get }

Page 68: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Page 69: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Review 2014 Session 508: Camera Capture Manual Controls

Page 70: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Review 2014 Session 508: Camera Capture Manual ControlsAuto Exposure and Manual Exposure Brackets

Page 71: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Review 2014 Session 508: Camera Capture Manual ControlsAuto Exposure and Manual Exposure BracketsAVCapturePhotoBracketSettings is a subclass of AVCapturePhotoSettings

Page 72: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Review 2014 Session 508: Camera Capture Manual ControlsAuto Exposure and Manual Exposure BracketsAVCapturePhotoBracketSettings is a subclass of AVCapturePhotoSettings public var bracketedSettings: [AVCaptureBracketedStillImageSettings] { get }public var isLensStabilizationEnabled: Bool

Page 73: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Review 2014 Session 508: Camera Capture Manual ControlsAuto Exposure and Manual Exposure BracketsAVCapturePhotoBracketSettings is a subclass of AVCapturePhotoSettings public var bracketedSettings: [AVCaptureBracketedStillImageSettings] { get }public var isLensStabilizationEnabled: Bool

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { // bracketSettings tells you which item in your array of bracketedSettings // this image corresponds to. }

Page 74: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Bracketed Capture Support

Review 2014 Session 508: Camera Capture Manual ControlsAuto Exposure and Manual Exposure BracketsAVCapturePhotoBracketSettings is a subclass of AVCapturePhotoSettings public var bracketedSettings: [AVCaptureBracketedStillImageSettings] { get }public var isLensStabilizationEnabled: Bool

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { // bracketSettings tells you which item in your array of bracketedSettings // this image corresponds to. }

Page 75: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Deprecated in iOS 10

AVCaptureStillImageOutput

AVCaptureDevice.flashActive

AVCaptureDevice isFlashModeSupported(_:)

AVCaptureDevice.flashMode

Page 76: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Deprecated in iOS 10

AVCaptureStillImageOutput

AVCaptureDevice.flashActive

AVCaptureDevice isFlashModeSupported(_:)

AVCaptureDevice.flashMode

AVCapturePhotoOutput

AVCapturePhotoOutput.isFlashScene

AVCapturePhotoOutput.supportedFlashModes

AVCapturePhotoSettings.flashMode

Page 77: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Benefits

Page 78: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Benefits

Easier bookkeeping

Page 79: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Benefits

Easier bookkeepingImmediate settings resolution

Page 80: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Benefits

Easier bookkeepingImmediate settings resolutionConfident request tracking

Page 81: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Benefits

Easier bookkeepingImmediate settings resolutionConfident request trackingExpandable palette of callbacks

Page 82: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing memoriesLive Photos

“A still photo captures an instant frozen in time. With Live Photos, you can turn those instants into unforgettable living memories.”

Page 83: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 84: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 85: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 86: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 87: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 88: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 89: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 90: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

Page 91: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a moment!

Page 92: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a moment!• Full resolution still image (12 MP JPEG)

Page 93: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a moment!• Full resolution still image (12 MP JPEG)• Same quality as non-Live Photo (SIS / OIS)

Page 94: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a moment!• Full resolution still image (12 MP JPEG)• Same quality as non-Live Photo (SIS / OIS)• “Frictionless” capture

Page 95: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

Page 96: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!

Page 97: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!• A short movie encompassing the still time

Page 98: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!• A short movie encompassing the still time• Screen resolution (1440x1080 or 1290x960)

Page 99: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!• A short movie encompassing the still time• Screen resolution (1440x1080 or 1290x960)• Includes audio

Page 100: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!• A short movie encompassing the still time• Screen resolution (1440x1080 or 1290x960)• Includes audioIn iOS 9.1 — “Shoe shot” auto trimming

Page 101: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!• A short movie encompassing the still time• Screen resolution (1440x1080 or 1290x960)• Includes audioIn iOS 9.1 — “Shoe shot” auto trimmingNew in iOS 10 — Video stabilization

Page 102: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Moment or memory?What is a Live Photo

It’s a memory!• A short movie encompassing the still time• Screen resolution (1440x1080 or 1290x960)• Includes audioIn iOS 9.1 — “Shoe shot” auto trimmingNew in iOS 10 — Video stabilizationNew in iOS 10 — Interruption-freemusic during capture

Page 103: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

It’s a moment and a memoryWhat is a Live Photo

Page 104: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo .MOV Asset

Video

Audio

Metadata

0.75 1.5 2.25 3

Photo Display Time

H.264, 1440x1080, 15 FPS, 7 Mbps

44.1 kHz, PCM, Mono or Stereo

Page 105: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Live Photos

Page 106: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Live Photos

Check AVCapturePhotoOutput.isLivePhotoCaptureSupported

Page 107: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Live Photos

Check AVCapturePhotoOutput.isLivePhotoCaptureSupportedLive Photo capture is only supported with the AVCaptureSessionPresetPhoto

Page 108: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Live Photos

Check AVCapturePhotoOutput.isLivePhotoCaptureSupportedLive Photo capture is only supported with the AVCaptureSessionPresetPhotoOpt in using AVCapturePhotoOutput.isLivePhotoCaptureEnabled = true

Page 109: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Live Photos

Check AVCapturePhotoOutput.isLivePhotoCaptureSupportedLive Photo capture is only supported with the AVCaptureSessionPresetPhotoOpt in using AVCapturePhotoOutput.isLivePhotoCaptureEnabled = trueAdd an AVCaptureDeviceInput for the microphone to your AVCaptureSession

Page 110: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Live Photos

Check AVCapturePhotoOutput.isLivePhotoCaptureSupportedLive Photo capture is only supported with the AVCaptureSessionPresetPhotoOpt in using AVCapturePhotoOutput.isLivePhotoCaptureEnabled = trueAdd an AVCaptureDeviceInput for the microphone to your AVCaptureSessionPresence of AVCaptureMovieFileOutput disables Live Photo capture

Page 111: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Example

func takeLivePhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true settings.livePhotoMovieFileURL = URL(fileURLWithPath: "\(NSTemporaryDirectory())/\(_uniqueAppSignature)_\(settings.uniqueID)") // Optional Movie-level Metadata var metadataItems = [AVMetadataItem]() let authorMetadataItem = AVMutableMetadataItem() authorMetadataItem.keySpace = AVMetadataKeySpaceCommon authorMetadataItem.key = AVMetadataCommonKeyAuthor authorMetadataItem.value = "Brad Ford" metadataItems.append(authorMetadataItem) settings.livePhotoMovieMetadata = metadataItems photoOutput.capturePhoto(with: settings, delegate: self) }

Page 112: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Example

func takeLivePhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true settings.livePhotoMovieFileURL = URL(fileURLWithPath: "\(NSTemporaryDirectory())/\(_uniqueAppSignature)_\(settings.uniqueID)") // Optional Movie-level Metadata var metadataItems = [AVMetadataItem]() let authorMetadataItem = AVMutableMetadataItem() authorMetadataItem.keySpace = AVMetadataKeySpaceCommon authorMetadataItem.key = AVMetadataCommonKeyAuthor authorMetadataItem.value = "Brad Ford" metadataItems.append(authorMetadataItem) settings.livePhotoMovieMetadata = metadataItems photoOutput.capturePhoto(with: settings, delegate: self) }

Page 113: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Example

func takeLivePhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true settings.livePhotoMovieFileURL = URL(fileURLWithPath: "\(NSTemporaryDirectory())/\(_uniqueAppSignature)_\(settings.uniqueID)") // Optional Movie-level Metadata var metadataItems = [AVMetadataItem]() let authorMetadataItem = AVMutableMetadataItem() authorMetadataItem.keySpace = AVMetadataKeySpaceCommon authorMetadataItem.key = AVMetadataCommonKeyAuthor authorMetadataItem.value = "Brad Ford" metadataItems.append(authorMetadataItem) settings.livePhotoMovieMetadata = metadataItems photoOutput.capturePhoto(with: settings, delegate: self) }

Page 114: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Example

func takeLivePhoto() { let settings = AVCapturePhotoSettings() settings.isHighResolutionPhotoEnabled = true settings.livePhotoMovieFileURL = URL(fileURLWithPath: "\(NSTemporaryDirectory())/\(_uniqueAppSignature)_\(settings.uniqueID)") // Optional Movie-level Metadata var metadataItems = [AVMetadataItem]() let authorMetadataItem = AVMutableMetadataItem() authorMetadataItem.keySpace = AVMetadataKeySpaceCommon authorMetadataItem.key = AVMetadataCommonKeyAuthor authorMetadataItem.value = "Brad Ford" metadataItems.append(authorMetadataItem) settings.livePhotoMovieMetadata = metadataItems photoOutput.capturePhoto(with: settings, delegate: self) }

Page 115: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

willBeginCaptureForResolvedSetting

Live Photo Delegate Methods

Time

livePhotoMovieURL = someURL

AVCapturePhotoCaptureDelegate

AVCaptureResolvedPhotoSettingslivePhotoMovieDimensions = {1440x1080}

Page 116: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Delegate Methods

Time

livePhotoMovieURL = someURL

AVCapturePhotoCaptureDelegate

didFinishProcessingPhotoSampleBuffer

CMSampleBuffer

Page 117: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

1.5s

didFinishRecordingLivePhotoMovieForEventualFileAtURL

Live Photo Delegate Methods

Time

livePhotoMovieURL = someURL

AVCapturePhotoCaptureDelegate

Page 118: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

1.5s

Live Photo Delegate Methods

Time

livePhotoMovieURL = someURL

AVCapturePhotoCaptureDelegate

didFinishProcessingLivePhotoToMovieFileAtURL

Page 119: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

1.5s

Live Photo Delegate Methods

Time

livePhotoMovieURL = someURL

AVCapturePhotoCaptureDelegate

didFinishCaptureForResolvedSettings

Page 120: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Delegate Methods

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let photoSampleBuffer = photoSampleBuffer, data = AVCapturePhotoOutput.jpegPhotoDataRepresentation(forJPEGSampleBuffer: photoSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { do { try data.write(to: _uniqueJPEGFilePath, options: .atomicWrite) } catch { // Handle error } } }

Page 121: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Delegate Methods

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let photoSampleBuffer = photoSampleBuffer, data = AVCapturePhotoOutput.jpegPhotoDataRepresentation(forJPEGSampleBuffer: photoSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { do { try data.write(to: _uniqueJPEGFilePath, options: .atomicWrite) } catch { // Handle error } } }

Page 122: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Live Photo Capture Delegate Methods

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let photoSampleBuffer = photoSampleBuffer, data = AVCapturePhotoOutput.jpegPhotoDataRepresentation(forJPEGSampleBuffer: photoSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { do { try data.write(to: _uniqueJPEGFilePath, options: .atomicWrite) } catch { // Handle error } } }

Page 123: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Tip

Page 124: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Tip

Some types of photo captures deliver multiple assets

Page 125: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Tip

Some types of photo captures deliver multiple assets Instantiate a new AVCapturePhotoCaptureDelegate object for each photo request

Page 126: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Tip

Some types of photo captures deliver multiple assets Instantiate a new AVCapturePhotoCaptureDelegate object for each photo requestAggregate assets in the delegate object

Page 127: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoCaptureDelegate Tip

Some types of photo captures deliver multiple assets Instantiate a new AVCapturePhotoCaptureDelegate object for each photo requestAggregate assets in the delegate objectDispose of the object after didFinishCaptureForResolvedSettings:

Page 128: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

PHLivePhoto PHLivePhotoViewPHImageManager

Page 129: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

PHLivePhotoEditingContext

Page 130: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

PHLivePhotoEditingContext

NEW

Page 131: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

DemoLive Photo Capture and Editing

AVCam and LivePhotoEditor

Page 132: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture in AVCam

Page 133: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture in AVCam

Separate video recording and photo modes

Page 134: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture in AVCam

Separate video recording and photo modesShows proper “Live” badging technique

Page 135: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture in AVCam

Separate video recording and photo modesShows proper “Live” badging techniqueSaves assets to Photo Library

Page 136: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture in AVCam

Separate video recording and photo modesShows proper “Live” badging techniqueSaves assets to Photo LibrarySample code available now!

Page 137: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

More Live Photo Editing in Session 505

Live Photo Editing and RAW Processingwith Core Image Nob Hill Thursday 11:00AM

Page 138: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

Page 139: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P1

Page 140: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P1 Obnoxious Foghorn

Page 141: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P2P1 Obnoxious Foghorn

Page 142: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P2P1 Obnoxious Foghorn

Page 143: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P2P1 Obnoxious Foghorn

output.isLivePhotoCaptureSuspended = true

Page 144: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P2P1 Obnoxious Foghorn

output.isLivePhotoCaptureSuspended = true

Page 145: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P2P1 Obnoxious Foghorn

output.isLivePhotoCaptureSuspended = true

output.isLivePhotoCaptureSuspended = false

Page 146: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Suspension

Time

P2P1 Obnoxious Foghorn

output.isLivePhotoCaptureSuspended = true

output.isLivePhotoCaptureSuspended = false

Page 147: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Support

Page 148: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Live Photo Capture Support

iPhone 6s

iPhone 6s Plus

iPhone SE

9.7-inch iPad Pro

Page 149: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

with a dash of DNG on the sideRAW Photo Capture

Page 150: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is RAW?

Page 151: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is RAW?

Page 152: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is RAW?

Color Filter Array

Page 153: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is RAW?

Color Filter Array

Light From Scene

Page 154: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is RAW?

Sensor Array

Color Filter Array

Light From Scene

Page 155: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is Stored in a RAW file?

Page 156: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is Stored in a RAW file?

Intensity of red, green, or blue light hitting the sensor

Page 157: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is Stored in a RAW file?

Intensity of red, green, or blue light hitting the sensorBayer pattern as metadata

Page 158: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What is Stored in a RAW file?

Intensity of red, green, or blue light hitting the sensorBayer pattern as metadataA lot of other metadata

Page 159: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What Do RAW Converters Do?

Page 160: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

What Do RAW Converters Do?

Demosaic Bayer filter patternApply white balanceInterpret Colorimetric InfoCorrect GammaReduce NoiseSharpen

Page 161: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why RAW?

Page 162: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why RAW?

Bake-time flexibility

Page 163: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why RAW?

Bake-time flexibilityNo compression

Page 164: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why RAW?

Bake-time flexibilityNo compressionMore bits

Page 165: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why RAW?

Bake-time flexibilityNo compressionMore bitsLots of headroom for editing

Page 166: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why RAW?

Bake-time flexibilityNo compressionMore bitsLots of headroom for editingGreater artistic freedom to interpret the image data in post

Page 167: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why JPEG?

Page 168: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why JPEG?

Lovingly baked by Apple

Page 169: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why JPEG?

Lovingly baked by AppleMuch faster rendering

Page 170: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why JPEG?

Lovingly baked by AppleMuch faster renderingMultiple image fusion (e.g. for stabilization)

Page 171: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Why JPEG?

Lovingly baked by AppleMuch faster renderingMultiple image fusion (e.g. for stabilization)Smaller file size

Page 172: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// CVPixelBuffer.h

/* Bayer 14-bit Little-Endian, packed in 16-bits, ordered G R G R... alternating with B G B G... */

kCVPixelFormatType_14Bayer_GRBG = OSType(“grb4”), /* Bayer 14-bit Little-Endian, packed in 16-bits, ordered R G R G... alternating with G B G B... */

kCVPixelFormatType_14Bayer_RGGB = OSType(“rgg4”),

/* Bayer 14-bit Little-Endian, packed in 16-bits, ordered B G B G... alternating with G R G R... */

kCVPixelFormatType_14Bayer_BGGR = OSType(“bgg4”),

/* Bayer 14-bit Little-Endian, packed in 16-bits, ordered G B G B... alternating with R G R G... */

kCVPixelFormatType_14Bayer_GBRG = OSType(“gbr4”),

Page 173: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing RAW with AVCapturePhotoOutput

Page 174: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing RAW with AVCapturePhotoOutput

RAW is only supported when using a photo format ( AVCaptureSessionPresetPhoto )

Page 175: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing RAW with AVCapturePhotoOutput

RAW is only supported when using a photo format ( AVCaptureSessionPresetPhoto )Rear camera only

Page 176: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing RAW with AVCapturePhotoOutput

RAW is only supported when using a photo format ( AVCaptureSessionPresetPhoto )Rear camera onlyRAW bracketed captures are supported

Page 177: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRawPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat)

// RAW photo settings have autoStillImageStabilizationEnabled set to NO

// highResolutionPhotoEnabled is also NO as it’s meaningless in RAW

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 178: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRawPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat)

// RAW photo settings have autoStillImageStabilizationEnabled set to NO

// highResolutionPhotoEnabled is also NO as it’s meaningless in RAW

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 179: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRawPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat)

// RAW photo settings have autoStillImageStabilizationEnabled set to NO

// highResolutionPhotoEnabled is also NO as it’s meaningless in RAW

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 180: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRawPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat)

// RAW photo settings have autoStillImageStabilizationEnabled set to NO

// highResolutionPhotoEnabled is also NO as it’s meaningless in RAW

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 181: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// RAW related AVCapturePhotoCaptureDelegate methods

func capture(_ captureOutput: AVCapturePhotoOutput,

didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?,

previewPhotoSampleBuffer: CMSampleBuffer?,

resolvedSettings: AVCaptureResolvedPhotoSettings,

bracketSettings: AVCaptureBracketedStillImageSettings?,

error: NSError?)

{

// Handle the RAW sample buffer

}

Page 182: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// RAW related AVCapturePhotoCaptureDelegate methods

func capture(_ captureOutput: AVCapturePhotoOutput,

didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?,

previewPhotoSampleBuffer: CMSampleBuffer?,

resolvedSettings: AVCaptureResolvedPhotoSettings,

bracketSettings: AVCaptureBracketedStillImageSettings?,

error: NSError?)

{

// Handle the RAW sample buffer

}

Page 183: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// RAW related AVCapturePhotoCaptureDelegate methods

func capture(_ captureOutput: AVCapturePhotoOutput,

didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?,

previewPhotoSampleBuffer: CMSampleBuffer?,

resolvedSettings: AVCaptureResolvedPhotoSettings,

bracketSettings: AVCaptureBracketedStillImageSettings?,

error: NSError?)

{

// Handle the RAW sample buffer

}

Page 184: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW + Processed Image Support

Page 185: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW + Processed Image Support

Processed image may be JPEG, or an uncompressed format

Page 186: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW + Processed Image Support

Processed image may be JPEG, or an uncompressed formatThe processed image is delivered to didFinishProcessingPhotoSampleBuffer:

Page 187: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW + Processed Image Support

Processed image may be JPEG, or an uncompressed formatThe processed image is delivered to didFinishProcessingPhotoSampleBuffer: The RAW image is delivered to didFinishProcessingRAWPhotoSampleBuffer:

Page 188: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW + Processed Image Support

Processed image may be JPEG, or an uncompressed formatThe processed image is delivered to didFinishProcessingPhotoSampleBuffer: The RAW image is delivered to didFinishProcessingRAWPhotoSampleBuffer:RAW + processed brackets are supported

Page 189: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW + Processed Image Support

Processed image may be JPEG, or an uncompressed formatThe processed image is delivered to didFinishProcessingPhotoSampleBuffer: The RAW image is delivered to didFinishProcessingRAWPhotoSampleBuffer:RAW + processed brackets are supportedRAW + still image stabilization processed image is NOT supported

Page 190: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRAWPlusJPEGPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let processedFormat = photoOutput.availablePhotoCodecTypes.first!

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat, processedFormat: [AVVideoCodecKey : processedFormat])

// highResolutionPhotoEnabled YES or NO applies only to the processed photo

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 191: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRAWPlusJPEGPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let processedFormat = photoOutput.availablePhotoCodecTypes.first!

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat, processedFormat: [AVVideoCodecKey : processedFormat])

// highResolutionPhotoEnabled YES or NO applies only to the processed photo

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 192: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing RAW Photos

func takeRAWPlusJPEGPhoto()

{

let rawFormat = photoOutput.availableRawPhotoPixelFormatTypes.first!.uint32Value

let processedFormat = photoOutput.availablePhotoCodecTypes.first!

let settings = AVCapturePhotoSettings(rawPixelFormatType: rawFormat, processedFormat: [AVVideoCodecKey : processedFormat])

// highResolutionPhotoEnabled YES or NO applies only to the processed photo

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 193: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Storing RAW Buffers

Page 194: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Writing RAW to DNG

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let rawSampleBuffer = rawSampleBuffer, data = AVCapturePhotoOutput.dngPhotoDataRepresentation(forRawSampleBuffer: rawSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { let filePath = (_uniqueFilePath as NSString).appendingPathExtension(".dng")! do { try data.write(to: URL(fileURLWithPath: filePath), options: .atomicWrite) } catch { // Handle error } } }

Page 195: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Writing RAW to DNG

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let rawSampleBuffer = rawSampleBuffer, data = AVCapturePhotoOutput.dngPhotoDataRepresentation(forRawSampleBuffer: rawSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { let filePath = (_uniqueFilePath as NSString).appendingPathExtension(".dng")! do { try data.write(to: URL(fileURLWithPath: filePath), options: .atomicWrite) } catch { // Handle error } } }

Page 196: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

DemoRAW Capture and Editing

AVCamManual and RawExpose

Page 197: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

More on RAW Processing in Session 505

Live Photo Editing and RAW Processingwith Core Image Nob Hill Thursday 11:00AM

Page 198: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW Photo Capture Support

Page 199: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

RAW Photo Capture Support

iPhone 6s

iPhone 6s Plus

iPhone SE

9.7-inch iPad Pro

Page 200: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

a.k.a. ThumbnailsCapturing Preview Images

Page 201: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 202: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 203: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

JPEG

NAND

Page 204: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

JPEG Downscale DisplayDecompress

NAND

Page 205: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

JPEG

Decompressed, downscaled image

Downscale DisplayDecompress

NAND

Page 206: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

JPEG

DisplayDecompressed, downscaled image

NAND

Page 207: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Images

Page 208: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Images

didFinishProcessing{Raw}PhotoSampleBuffer: callback can deliver a preview image

Page 209: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Images

didFinishProcessing{Raw}PhotoSampleBuffer: callback can deliver a preview imagePreview image is uncompressed

Page 210: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Images

didFinishProcessing{Raw}PhotoSampleBuffer: callback can deliver a preview imagePreview image is uncompressedYou can specify the preview image dimensions

Page 211: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Images

didFinishProcessing{Raw}PhotoSampleBuffer: callback can deliver a preview imagePreview image is uncompressedYou can specify the preview image dimensionsPhoto output can select a size for you

Page 212: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing a processed image with a preview (thumbnail)

func takePhotoWithPreviewImage()

{

let settings = AVCapturePhotoSettings()

settings.isHighResolutionPhotoEnabled = true

let previewPixelType = settings.availablePreviewPhotoPixelFormatTypes.first!.uint32Value

let previewFormat = [kCVPixelBufferPixelFormatTypeKey as String : previewPixelType as! AnyObject,

kCVPixelBufferWidthKey as String : 160,

kCVPixelBufferHeightKey as String : 160]

settings.previewPhotoFormat = previewFormat

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 213: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing a processed image with a preview (thumbnail)

func takePhotoWithPreviewImage()

{

let settings = AVCapturePhotoSettings()

settings.isHighResolutionPhotoEnabled = true

let previewPixelType = settings.availablePreviewPhotoPixelFormatTypes.first!.uint32Value

let previewFormat = [kCVPixelBufferPixelFormatTypeKey as String : previewPixelType as! AnyObject,

kCVPixelBufferWidthKey as String : 160,

kCVPixelBufferHeightKey as String : 160]

settings.previewPhotoFormat = previewFormat

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 214: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing a processed image with a preview (thumbnail)

func takePhotoWithPreviewImage()

{

let settings = AVCapturePhotoSettings()

settings.isHighResolutionPhotoEnabled = true

let previewPixelType = settings.availablePreviewPhotoPixelFormatTypes.first!.uint32Value

let previewFormat = [kCVPixelBufferPixelFormatTypeKey as String : previewPixelType as! AnyObject,

kCVPixelBufferWidthKey as String : 160,

kCVPixelBufferHeightKey as String : 160]

settings.previewPhotoFormat = previewFormat

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 215: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Capturing a processed image with a preview (thumbnail)

func takePhotoWithPreviewImage()

{

let settings = AVCapturePhotoSettings()

settings.isHighResolutionPhotoEnabled = true

let previewPixelType = settings.availablePreviewPhotoPixelFormatTypes.first!.uint32Value

let previewFormat = [kCVPixelBufferPixelFormatTypeKey as String : previewPixelType as! AnyObject,

kCVPixelBufferWidthKey as String : 160,

kCVPixelBufferHeightKey as String : 160]

settings.previewPhotoFormat = previewFormat

photoOutput.capturePhoto(with: settings, delegate: self)

}

Page 216: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Image Retrieval

Time

JPEG + previewFormat = 420f, 160x160

AVCapturePhotoCaptureDelegate

willBeginCaptureForResolvedSettings

Page 217: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Image Retrieval

Time

JPEG + previewFormat = 420f, 160x160

AVCapturePhotoCaptureDelegate

willBeginCaptureForResolvedSettingsAVCaptureResolvedPhotoSettings

photoDimensions = 4032x3024previewPhotoDimensions = 160x120

Page 218: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Preview Image Retrieval

Time

JPEG + previewFormat = 420f, 160x160

AVCapturePhotoCaptureDelegate

willBeginCaptureForResolvedSettings

didFinishProcessingPhotoSampleBuffer

CMSampleBuffer

CMSampleBuffer

previewPhotoSampleBuffer

Page 219: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Use preview image as a thumbnail

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let rawSampleBuffer = rawSampleBuffer, data = AVCapturePhotoOutput.dngPhotoDataRepresentation(forRawSampleBuffer: rawSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { let filePath = (_uniqueFilePath as NSString).appendingPathExtension(".dng")! do { try data.write(to: URL(fileURLWithPath: filePath), options: .atomicWrite) } catch { // Handle error } } }

Page 220: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Use preview image as a thumbnail

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let rawSampleBuffer = rawSampleBuffer, data = AVCapturePhotoOutput.dngPhotoDataRepresentation(forRawSampleBuffer: rawSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { let filePath = (_uniqueFilePath as NSString).appendingPathExtension(".dng")! do { try data.write(to: URL(fileURLWithPath: filePath), options: .atomicWrite) } catch { // Handle error } } }

Page 221: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

// Use preview image as a thumbnail

func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) { if let rawSampleBuffer = rawSampleBuffer, data = AVCapturePhotoOutput.dngPhotoDataRepresentation(forRawSampleBuffer: rawSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) { let filePath = (_uniqueFilePath as NSString).appendingPathExtension(".dng")! do { try data.write(to: URL(fileURLWithPath: filePath), options: .atomicWrite) } catch { // Handle error } } }

Page 222: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Everywhere!Preview Image Support

Page 223: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Wide Color Capture

Page 224: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Brief Overview

Page 225: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Brief Overview

iPad Pro 9.7 True Tone Display

Page 226: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Brief Overview

iPad Pro 9.7 True Tone DisplayColor management in iOS 9.3!

Page 227: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

sRGB color spaceIntro to Wide Color

Page 228: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

sRGB color spaceIntro to Wide Color

Based on the ITU-R BT.709 standard

Page 229: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

sRGB color spaceIntro to Wide Color

Based on the ITU-R BT.709 standard

Gamma ≈ 2.2

Page 230: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

sRGB color spaceIntro to Wide Color

Based on the ITU-R BT.709 standard

Gamma ≈ 2.2White point of 6500 degrees K (D65)

Page 231: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Display P3 color spaceIntro to Wide Color

Page 232: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Display P3 color spaceIntro to Wide Color

Based on the DCI-P3 standard

Page 233: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Display P3 color spaceIntro to Wide Color

Based on the DCI-P3 standard

Gamma ≈ 2.2

Page 234: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Display P3 color spaceIntro to Wide Color

Based on the DCI-P3 standard

Gamma ≈ 2.2White point of 6500 degrees K (D65)

Page 235: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 236: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven
Page 237: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDeviceInput

AVCapturePhotoOutput AVCaptureMovieFileOutput

AVCaptureConnection AVCaptureConnection

AVCaptureSession

AVCaptureDevice (Camera)

Page 238: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDeviceInput

AVCapturePhotoOutput AVCaptureMovieFileOutput

AVCaptureConnection AVCaptureConnection

AVCaptureSession

AVCaptureDevice (Camera)

Page 239: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDeviceInput

AVCapturePhotoOutput AVCaptureMovieFileOutput

AVCaptureConnection AVCaptureConnection

AVCaptureSession

AVCaptureDevice (Camera)

Page 240: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

formats

Page 241: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

formats

`

public var supportedColorSpaces: [NSNumber]! { get }

public enum AVCaptureColorSpace : Int { case sRGB case P3_D65 }

Page 242: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

formats

Page 243: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

formats

420v supports sRGB only

Page 244: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

formats

420f supports sRGB and Display P3

Page 245: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

4032x3024 (12 MP) @ 30 FPS, 420f

activeFormat

formats

Page 246: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Capturing Display P3 Color on iPad Pro 9.7

AVCaptureDevice (Camera)

1920x1080 (1080p) @ 30 FPS, 420v1920x1080 (1080p) @ 30 FPS, 420f4032x3024 (12 MP) @ 30 FPS, 420v

formats

4032x3024 (12 MP) @ 30 FPS, 420f

4032x3024 (12 MP) @ 30 FPS, 420f

activeFormat

P3 D65

activeColorSpace

formats

Page 247: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Automatic Color Space Selection in AVCaptureSession

Page 248: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Automatic Color Space Selection in AVCaptureSessionpublic var automaticallyConfiguresCaptureDeviceForWideColor: Bool

Page 249: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Automatic Color Space Selection in AVCaptureSessionpublic var automaticallyConfiguresCaptureDeviceForWideColor: Bool

Session sets your device’s activeColorSpace to P3_D65 depending on your config

Page 250: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Automatic Color Space Selection in AVCaptureSessionpublic var automaticallyConfiguresCaptureDeviceForWideColor: Bool

Session sets your device’s activeColorSpace to P3_D65 depending on your configAVCapturePhotoOutput must be present in the session

Page 251: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Automatic Color Space Selection in AVCaptureSession

Session contains photo output and… Session configures device for…

AVCaptureVideoPreviewLayer Display P3

AVCaptureMovieFileOutput sRGB

AVCaptureVideoDataOutput Display P3 *only if sessionPreset is Photo*

Page 252: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Forcing Display P3 Color

Page 253: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Forcing Display P3 Color

Set session.automaticallyConfiguresDeviceForWideColor = false

Page 254: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Forcing Display P3 Color

Set session.automaticallyConfiguresDeviceForWideColor = falseSet device.activeFormat to a format that supports wide color

Page 255: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Forcing Display P3 Color

Set session.automaticallyConfiguresDeviceForWideColor = falseSet device.activeFormat to a format that supports wide colorSet device.activeColorSpace = P3_D65

Page 256: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

The Danger of Forcing Display P3 Color

Page 257: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

The Danger of Forcing Display P3 Color

Display P3 is not well-supported in video

Page 258: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

The Danger of Forcing Display P3 Color

Display P3 is not well-supported in videoVideoDataOutput callback should be color-aware and propagate color tags

Page 259: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

The Danger of Forcing Display P3 Color

Display P3 is not well-supported in videoVideoDataOutput callback should be color-aware and propagate color tagsDisplay P3 movies from MovieFileOutput may render incorrectly on other platforms

Page 260: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Sharing Wide Color Photos

Page 261: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Sharing Wide Color Photos

Wide color JPEG files use a Display P3 Color Profile

Page 262: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Sharing Wide Color Photos

Wide color JPEG files use a Display P3 Color ProfileiCloud Photo Library is color-aware

Page 263: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Sharing Wide Color Photos

Wide color JPEG files use a Display P3 Color ProfileiCloud Photo Library is color-awareDisplay P3 JPEGs via Messages and Mail are converted to Apple Wide Color Sharing Profile

Page 264: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Sharing Wide Color Photos

Wide color JPEG files use a Display P3 Color ProfileiCloud Photo Library is color-awareDisplay P3 JPEGs via Messages and Mail are converted to Apple Wide Color Sharing Profile

Live Photo Editing and RAW Processing with Core Image Nob Hill Thursday 11:00AM

Working With Wide Color Mission Thursday 1:40PM

Page 265: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Wide Color Support on iPad Pro 9.7

Page 266: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Wide Color Support on iPad Pro 9.7‘420f’, ‘BGRA’, and ‘jpeg’

Page 267: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Wide Color Support on iPad Pro 9.7‘420f’, ‘BGRA’, and ‘jpeg’Live Photos (still image and movie)

Page 268: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

AVCapturePhotoOutput Wide Color Support on iPad Pro 9.7‘420f’, ‘BGRA’, and ‘jpeg’Live Photos (still image and movie)Bracketed capture

Page 269: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Wide Color and RAW

Page 270: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Wide Color and RAW

Apple camera RAW images are inherently wide color

Page 271: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Wide Color and RAW

Apple camera RAW images are inherently wide colorCamera sensor primaries are rich enough to extract Display P3 or sRGB

Page 272: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

More on Wide Color

Live Photo Editing and RAW Processing with Core Image Nob Hill Thursday 11:00AM

Working With Wide Color Mission Thursday 1:40PM

Page 273: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Summary

Use AVCapturePhotoOutput for improved usability

Page 274: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Summary

Use AVCapturePhotoOutput for improved usability• Live Photos

Page 275: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Summary

Use AVCapturePhotoOutput for improved usability• Live Photos• RAW, RAW + JPEG and DNG

Page 276: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Summary

Use AVCapturePhotoOutput for improved usability• Live Photos• RAW, RAW + JPEG and DNG• Preview Images

Page 277: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Summary

Use AVCapturePhotoOutput for improved usability• Live Photos• RAW, RAW + JPEG and DNG• Preview Images• Wide Color Photos

Page 278: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Session 511: A chalk talk addendumAVCapturePhotoOutput—Beyond the Basics

Page 279: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Session 511: A chalk talk addendumAVCapturePhotoOutput—Beyond the Basics

Scene monitoring in AVCapturePhotoOutput

Page 280: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Session 511: A chalk talk addendumAVCapturePhotoOutput—Beyond the Basics

Scene monitoring in AVCapturePhotoOutputResource preparation and reclamation in AVCapturePhotoOutput

Page 281: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Session 511: A chalk talk addendumAVCapturePhotoOutput—Beyond the Basics

Scene monitoring in AVCapturePhotoOutputResource preparation and reclamation in AVCapturePhotoOutputChanges to camera privacy policy in iOS 10

Page 282: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

More Information

https://developer.apple.com/wwdc16/501

Page 283: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Related Sessions

AVCapturePhotoOutput—Beyond the Basics Video At your leisure

Live Photo Editing and RAW Processing with Core Image Nob Hill Thursday 11:00AM

Working With Wide Color Mission Thursday 1:40PM

Page 284: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven

Labs

Photo Capture Lab Graphics, Games, and Media Lab D Tuesday 1:00PM

PhotoKit Lab Graphics, Games, and Media Lab D Tuesday 4:00PM

Color Lab Frameworks Lab A Wednesday 1:00PM

Photo Capture Lab Graphics, Games, and Media Lab C Thursday 9:00AM

Live Photo & Core Image Lab Graphics, Games, and Media Lab C Thursday 1:30PM

Live Photo & Core Image Lab Graphics, Games, and Media Lab D Friday 9:00AM

Color Lab Graphics, Games, and Media Lab C Friday 4:00PM

Page 285: Advances in iOS Photography - Apple Inc....Camera Capture Manual Controls (iOS 8 / Yosemite) WWDC 2014 Agenda Agenda New AVCaptureOutput Agenda New AVCaptureOutput New photography-driven