hello,
I’m trying to get metadata dictionary from an image file
I need help to convert NSURL to CFURLRef
and CFDictionaryRef to NSDictionary to Applescript’s Dictionary
thanks
here is the code
use AppleScript version “2.4”
use framework “Foundation”
use framework “CoreImage”
use scripting additions
set thePath to POSIX path of (path to desktop) & “test.HEIC”
set theURL to current application’s |NSURL|'s fileURLWithPath:thePath
–convert NSURL to CFURLRef
set theImage to current application’s CGImageSourceCreateWithURL(theURL, null)
set theDictionary to current application’s CGImageSourceCopyPropertiesAtIndex(theImage, 0, null)
–convert CFDictionaryRef to NSDictionary to Applescript’s Dictionary