Affichage des articles dont le libellé est core foundation. Afficher tous les articles
Affichage des articles dont le libellé est core foundation. Afficher tous les articles

samedi 12 janvier 2013

Geotagging JPEG with Core Foundation

I was searching a way to edit or add GPS metadata of JPEG files without using an external library inside a Mac Application. After looking on internet and reading the ImageIOKit documentation, I found an interesting post on the Apple Mailing List talking about this topic and an old bug related to it. It includes a code sample that is apparently working now (Mac Os X 10.8).  I just wanted to add some details about it :
  • The values corresponding to the kCGImagePropertyGPSLatitudeRef/kCGImagePropertyGPSLongitudedRef keys are expected to be of type NSString.
  • The values corresponding to the kCGImagePropertyGPSLatitude/kCGImagePropertyGPSLongitude keys are expected to be of type NSNumber.