• Save
Integrating with the Photography Ecosystem on Mac OS X
Upcoming SlideShare
Loading in...5
×
 

Integrating with the Photography Ecosystem on Mac OS X

on

  • 3,902 views

Presentation delivered at NSConference 2009, Hatfield, UK.

Presentation delivered at NSConference 2009, Hatfield, UK.

Statistics

Views

Total Views
3,902
Views on SlideShare
3,885
Embed Views
17

Actions

Likes
2
Downloads
0
Comments
0

1 Embed 17

http://www.slideshare.net 17

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Nikon Coolpix P6000 with GPS. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • Note that IKImageBrowserGroupRangeKey takes the location of the first image in the group whilst the method parameter _index_ refers to the index of the group. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Integrating with the Photography Ecosystem on Mac OS X Integrating with the Photography Ecosystem on Mac OS X Presentation Transcript

  • Integrating with the Photography Ecosystem on Mac OS X
  • The Ecosystem
  • The Ecosystem Image Capture
  • The Ecosystem Image IO Image Capture
  • The Ecosystem Image Kit Quicktime Core Image Image IO Image Capture
  • The Ecosystem iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Today iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • No Private APIs Photo: Trey Ratcliff/Flickr
  • RAW
  • Photo: Flickr user Svet
  • • Sensor data + decision data Photo: Flickr user Svet
  • • Sensor data + decision data • No processing in-camera Photo: Flickr user Svet
  • • Sensor data + decision data • No processing in-camera • No compression Photo: Flickr user Svet
  • • Sensor data + decision data • No processing in-camera • No compression • Big Files Photo: Flickr user Svet
  • • Sensor data + decision data • No processing in-camera • No compression • Big Files • Every camera needs specific support Photo: Flickr user Svet
  • Photographers who spend money on their craft shoot RAW.
  • Photographers who will buy your application shoot RAW.
  • Do not assume you can pretend that RAW doesn’t exist.
  • That said, you do not want to be on the treadmill of directly supporting RAW formats.
  • Even Apple struggles with that.
  • Let Lightroom, Aperture or iPhoto handle it
  • Photography Workflow Ingest Metadata Edit Output
  • Workflow • Image Capture • Ingest Aperture • Lightroom • iPhoto
  • Workflow Ingest Metadata Edit Output
  • Workflow • Title • Metadata Captions • Copyright • Keywords
  • Metadata is a lot of effort: respect that Metadata effort.
  • GPS Metadata workflow still Metadata sucks.
  • Temporary Metadata problem.
  • One day, all cameras will write geodata Metadata to EXIF.
  • Workflow Ingest Metadata Edit Output
  • Workflow • Photoshop: pixel editing • Edit iPhoto: Master + single Version • Aperture: Master + Versions model
  • Master File (usually RAW)
  • Default Core Image Recipe Master File (usually RAW)
  • Default Exposure Core Core Image Image Recipe Recipe Master File (usually RAW)
  • Default Exposure B &W Core Core Core Image Image Image Recipe Recipe Recipe Master File (usually RAW)
  • Default Exposure B &W Crop Core Core Core Core Image Image Image Image Recipe Recipe Recipe Recipe Master File (usually RAW)
  • {CI Recipe} {CI Recipe}
  • {Image Record} {CI Recipe} {CI Recipe}
  • {Image Record} {CI Recipe} {CI Recipe}
  • What exists and when? • Master file exists, but may be offline. • A JPEG preview may exist. • CI recipes exist in Aperture DB.
  • Preview generation is a preference
  • Workflow Ingest Metadata Edit Output
  • Workflow Output
  • Workflow • Version Export to disk Output
  • Workflow • Version Export to disk • Media Browser Output
  • Workflow • Version Export to disk • Media Browser Output • Drag & Drop previews out of Aperture
  • Workflow • Version Export to disk • Media Browser Output • Drag & Drop previews out of Aperture • Export plugins
  • Media Browser
  • Media Browser • No API for Apple’s Media Browser
  • Media Browser • No API for Apple’s Media Browser • Check out Karelia’s iMedia Browser • karelia.com/imedia
  • Preview Fingerprint
  • Preview Fingerprint Aperture writes its internal ID to the IPTC Special Instructions in previews.
  • Preview Fingerprint Aperture writes its internal ID to the IPTC Special Instructions in previews. mRG3bpEnT0GOSJ9qNuxk+g
  • Preview Fingerprint Aperture writes its internal ID to the IPTC Special Instructions in previews. mRG3bpEnT0GOSJ9qNuxk+g You can access versions by ID through AppleScript
  • The Ecosystem iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Image IO iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Your interface to RAW
  • Your interface to EXIF and IPTC
  • Your interface to thumbnail generation
  • Part of ApplicationServices framework
  • CGImageSource
  • CGImageSource • CGImageSourceCreateWithURL()
  • CGImageSource • CGImageSourceCreateWithURL() • CGImageSourceCopyPropertiesAtIndex()
  • CGImageSource • CGImageSourceCreateWithURL() • CGImageSourceCopyPropertiesAtIndex() • CGImageSourceCreateImageAtIndex()
  • CGImageSource • CGImageSourceCreateWithURL() • CGImageSourceCopyPropertiesAtIndex() • CGImageSourceCreateImageAtIndex() • CGImageSourceCreateThumbnailAtIndex()
  • CGImageSourceCopyPropertiesAtIndex() • Returns a dictionary of key/value pairs representing image metadata. • EXIF, IPTC, Manufacturer-specific fields • Keys are defined in CGImageProperties.h
  • High-level dictionaries kCGImageProperty{*}Dictionary • • TIFF MakerCanon • • GIF MakerNikon • • JFIF MakerMinolta • • Exif MakerFuji • • PNG MakerOlympus • • IPTC MakerPentax • • GPS 8BIM • • Raw DNG • • CIFF ExifAux
  • EXIF Keys • kCGImagePropertyExifExposureTime • kCGImagePropertyExifFNumber • kCGImagePropertyExifExposureProgram • kCGImagePropertyExifFocalLength • kCGImagePropertyExifISOSpeedRatings • ...etc...
  • GPS Keys • kCGImagePropertyGPSLatitude • kCGImagePropertyGPSLongitude • kCGImagePropertyGPSAltitude • kCGImagePropertyGPSTimeStamp • kCGImagePropertyGPSDOP • ...etc...
  • #1 ImageIO Gotcha: nothing is guaranteed.
  • Do not assume the existence of any key in this dictionary.
  • After all, cameras come from hardware manufacturers and they never support anything entirely correctly.
  • CGImageSourceCreateImageAtIndex() • Creates a CGImageRef from an image in the file. • Most image files have one image, but there is support for multiple representations. • CGImageSourceGetCount() tells you how many there are.
  • CGImageSourceCreateThumbnailAtIndex() • Creates a thumbnail from an index • Control thumbnail size with the options dictionary: • kCGImageSourceThumbnailMaxPixelSize
  • #2 ImageIO Gotcha: can’t write RAW files.
  • This is not your nibware geotagging API.
  • The Ecosystem iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Image Kit iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Image Kit: iPhoto in a box
  • Image Kit: iPhoto in a box IKImageBrowserView IKImageView IKSlideshow IKImageEditPanel
  • IKImageBrowserView
  • IKImageBrowserView
  • IKImageBrowserView provides:
  • IKImageBrowserView provides: • Fast, scalable, memory-efficient thumbnail view.
  • IKImageBrowserView provides: • Fast, scalable, memory-efficient thumbnail view. • Zooming
  • IKImageBrowserView provides: • Fast, scalable, memory-efficient thumbnail view. • Zooming • Selection
  • IKImageBrowserView provides: • Fast, scalable, memory-efficient thumbnail view. • Zooming • Selection • Grouping (iPhoto-style and Aperture-style)
  • IKGroupDisclosureStyle iPhoto: Thumbnails
  • IKGroupDisclosureStyle iPhoto: Thumbnails
  • IKGroupDisclosureStyle iPhoto: Thumbnails
  • IKGroupBezelStyle Aperture: Stacks
  • IKGroupBezelStyle Aperture: Stacks
  • IKGroupBezelStyle Aperture: Stacks
  • IKImageBrowserDataSource
  • IKImageBrowserDataSource • Required:
  • IKImageBrowserDataSource • Required: • -numberOfItemsInImageBrowser:
  • IKImageBrowserDataSource • Required: • -numberOfItemsInImageBrowser: • -imageBrowser:itemAtIndex:
  • IKImageBrowserDataSource • Required: • -numberOfItemsInImageBrowser: • -imageBrowser:itemAtIndex: • Returned item must implement IKImageBrowserItem protocol
  • IKImageBrowserItem • Required: • - (NSString *) imageUID • - (NSString *) imageRepresentationType • Constants for supported types • - (id) imageRepresentation
  • IKImageBrowser{*}RepresentationType • • Path QTMovie • • NSURL QTMoviePath • • NSImage QCComposition • • CGImage QCCompositionPath • • CGImageSource QuickLookPath • • NSData IconRefPath • • NSBitmapImage IconRef
  • IKImageBrowserDataSource
  • IKImageBrowserDataSource • Optional:
  • IKImageBrowserDataSource • Optional: • -numberOfGroupsInImageBrowser:
  • IKImageBrowserDataSource • Optional: • -numberOfGroupsInImageBrowser: • -(NSDictionary *)imageBrowser:groupAtIndex:
  • IKImageBrowserDataSource • Optional: • -numberOfGroupsInImageBrowser: • -(NSDictionary *)imageBrowser:groupAtIndex: • IKImageBrowserGroupStyle
  • IKImageBrowserDataSource • Optional: • -numberOfGroupsInImageBrowser: • -(NSDictionary *)imageBrowser:groupAtIndex: • IKImageBrowserGroupStyle • IKImageBrowserGroupBackgroundColorKey
  • IKImageBrowserDataSource • Optional: • -numberOfGroupsInImageBrowser: • -(NSDictionary *)imageBrowser:groupAtIndex: • IKImageBrowserGroupStyle • IKImageBrowserGroupBackgroundColorKey • IKImageBrowserGroupTitleKey
  • IKImageBrowserDataSource • Optional: • -numberOfGroupsInImageBrowser: • -(NSDictionary *)imageBrowser:groupAtIndex: • IKImageBrowserGroupStyle • IKImageBrowserGroupBackgroundColorKey • IKImageBrowserGroupTitleKey • IKImageBrowserGroupRangeKey
  • NSMakeRange(0,4)
  • NSMakeRange(0,4) NSMakeRange(4,2)
  • NSMakeRange(0,4) NSMakeRange(4,2) NSMakeRange(6,2)
  • NSMakeRange(0,4) NSMakeRange(4,2) NSMakeRange(6,2) NSMakeRange(8,3)
  • Two Gotchas
  • Two Gotchas • Constants for IKImageBrowserGroupStyleKey are defined in an enum, so pack them in NSNumber.
  • Two Gotchas • Constants for IKImageBrowserGroupStyleKey are defined in an enum, so pack them in NSNumber. • IKImageBrowserGroupRangeKey’s value should be an NSRange packed into an NSValue.
  • IKImageView • Rotate • Zoom • Crop • Drag & Drop • Quite hard to customise for additional functionality
  • IKImageEditPanel
  • IKImageEditPanel
  • IKImageEditPanel
  • IKImageEditPanel
  • IKSlideshow
  • IKSlideshow • Think: Quick Look slideshow in Finder.
  • IKSlideshow • Think: Quick Look slideshow in Finder. • IKSlideshowDataSource:
  • IKSlideshow • Think: Quick Look slideshow in Finder. • IKSlideshowDataSource: • -numberOfSlideshowItems
  • IKSlideshow • Think: Quick Look slideshow in Finder. • IKSlideshowDataSource: • -numberOfSlideshowItems • -slideshowItemAtIndex:
  • IKSlideshow • Think: Quick Look slideshow in Finder. • IKSlideshowDataSource: • -numberOfSlideshowItems • -slideshowItemAtIndex: • -nameOfSlideshowItemAtIndex:
  • IKSlideshow • Think: Quick Look slideshow in Finder. • IKSlideshowDataSource: • -numberOfSlideshowItems • -slideshowItemAtIndex: • -nameOfSlideshowItemAtIndex: • -canExportSlideshowItemAtIndex: toApplication:
  • IKSlideshow items
  • IKSlideshow items • No interface to implement, just return:
  • IKSlideshow items • No interface to implement, just return: • NSImage
  • IKSlideshow items • No interface to implement, just return: • NSImage • NSString (a path)
  • IKSlideshow items • No interface to implement, just return: • NSImage • NSString (a path) • NSURL
  • IKSlideshow items • No interface to implement, just return: • NSImage • NSString (a path) • NSURL • NSFileWrapper
  • IKSlideshow items • No interface to implement, just return: • NSImage • NSString (a path) • NSURL • NSFileWrapper • CGImageRef
  • IKSlideshow items • No interface to implement, just return: • NSImage • NSString (a path) • NSURL • NSFileWrapper • CGImageRef • PDFPage
  • The Ecosystem iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Aperture iPhoto Aperture Your App! Image Kit Quicktime Core Image Image IO Image Capture
  • Export Plugins
  • Export Plugins • Primary method of getting data from Aperture and iPhoto.
  • Export Plugins • Primary method of getting data from Aperture and iPhoto. • ObjC API-level access to Aperture
  • Export Plugins • Primary method of getting data from Aperture and iPhoto. • ObjC API-level access to Aperture • Focus on Aperture, mostly also valid for iPhoto
  • Export Plugins • Primary method of getting data from Aperture and iPhoto. • ObjC API-level access to Aperture • Focus on Aperture, mostly also valid for iPhoto • SDKs for both apps from connect.apple.com
  • Process Select Export Plugin UI Rendering Post-Export
  • Rendering MyPlugin ApertureExportManager -exportManagerShouldBeginExport -shouldBeginExport -exportManagerWillBeginExportToPath: -exportManagerShouldExportImageAtIndex:
  • Rendering MyPlugin ApertureExportManager exportManagerShouldWriteImageData: toRelativePath:forImageAtIndex: exportManagerDidWriteImageDataToRelativePath: forImageAtIndex: -exportManagerDidFinishExport
  • Process: Post-Export Post-Export
  • Process: Post-Export • Upload the images to the web • FlickrExport does all its upload work in exportManagerDidFinishExport Post-Export
  • Process: Post-Export • Upload the images to the web • FlickrExport does all its upload work in exportManagerDidFinishExport Post-Export • AppleScript another application to ingest them
  • Process: Post-Export • Upload the images to the web • FlickrExport does all its upload work in exportManagerDidFinishExport Post-Export • AppleScript another application to ingest them • Burn a disc
  • Process: Post-Export • Upload the images to the web • FlickrExport does all its upload work in exportManagerDidFinishExport Post-Export • AppleScript another application to ingest them • Burn a disc • Add metadata back to Aperture
  • Aperture Metadata • - addKeywords:toImageAtIndex: • - addHierarchicalKeywords:toImageAtIndex: • - addCustomMetadataKeyValues: toImageAtIndex:
  • Hierarchical Keywords Events > Conferences > C4[2] > Craig Hockenberry
  • addKeywords: toImageAtIndex:
  • addKeywords: toImageAtIndex: • Be careful: all keywords become top-level keywords in Aperture’s hierarchy,
  • addKeywords: toImageAtIndex: • Be careful: all keywords become top-level keywords in Aperture’s hierarchy, • Mess
  • addKeywords: toImageAtIndex: • Be careful: all keywords become top-level keywords in Aperture’s hierarchy, • Mess • Remember: photographers == picky curmudgeons obsessed with organisation
  • -addHierarchicalKeywords: toImageAtIndex: NSArray *kwdOne = [NSArray arrayWithObjects: @”Foo”, @”Bar”, @”Baz”, nil]; NSArray *allKeywds = [NSArray arrayWithObject: kwdOne];
  • -addHierarchicalKeywords: toImageAtIndex: NSArray *kwdOne = [NSArray arrayWithObjects: @”Foo”, Leaf Keyword @”Bar”, @”Baz”, nil]; NSArray *allKeywds = [NSArray arrayWithObject: kwdOne];
  • -addHierarchicalKeywords: toImageAtIndex: NSArray *kwdOne = [NSArray arrayWithObjects: @”Foo”, Leaf Keyword @”Bar”, Parent @”Baz”, nil]; NSArray *allKeywds = [NSArray arrayWithObject: kwdOne];
  • -addHierarchicalKeywords: toImageAtIndex: NSArray *kwdOne = [NSArray arrayWithObjects: @”Foo”, Leaf Keyword @”Bar”, Parent @”Baz”, Parent nil]; NSArray *allKeywds = [NSArray arrayWithObject: kwdOne];
  • addCustomMetadataKeyValues: toImageAtIndex: • Arbitrary dictionary of key/value pairs • Must be NSStrings • Appear in Aperture’s metadata inspector • Can be used in Smart Album criteria
  • FlickrExport Example • FlickrExport writes back: • Flickr ID • Flickr URL • Knowing the Flickr ID of a version in Aperture lets FlickrExport do replacement on a re-export
  • Custom metadata Custom Value Key
  • [“Flickr ID” length] != 0
  • rating >= 3 && [“Flickr ID” length] == 0
  • iPhoto Limitations • Can’t add metadata back to iPhoto • Can’t create new keywords • API has different method names, but conceptually almost identical
  • Thank You • fraser@speirs.org • @fraserspeirs • http://speirs.org • http://connectedflow.com