Created
August 9, 2014 09:57
-
-
Save tsuyukimakoto/c7ef8ed096a3e22bda7d to your computer and use it in GitHub Desktop.
Read exif data from raw file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Cocoa | |
for arg in Process.arguments[1...Process.arguments.count - 1] { | |
let cgDataRef = CGImageSourceCreateWithURL(NSURL.URLWithString("file://\(arg)"), nil).takeUnretainedValue() | |
let imageDict:CFDictionaryRef = CGImageSourceCopyPropertiesAtIndex(cgDataRef, 0, nil).takeUnretainedValue() | |
println(imageDict) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment