A text document's metadata may include information about length of document, the author, publish date, and a short summary of the. For example, an image may include metadata that describes how large the picture is, the color depth, the image resolution, the creation date, and other data. Thus, when you have an NSData object of an image container it's a completely different beast compared to the image data incapsulated in a UIImage object (EXIF header is just not present there). Metadata provides information about an asset's content. When the files are unpacked, the image is a completely different thing - an array of data representing pixels, where EXIF header is no longer relevant. Just download and un-zip the archive then double-click on ' exiftool (-k). UIImage *writtenImage = Ĭan EXIF metadata only be ready from the NSData?ĮXIF is a header for certain image files (containers like png, jpg, tif, etc.). However, if I read the data as a UIImage first, the data is gone: UIImage *writtenImage = ĬGImageSourceRef source = CGImageSourceCreateWithData((_bridge CFDataRef)UIImagePNGRepresentation(writtenImage), NULL) ĬFDictionaryRef imageProperties = CGImageSourceCopyPropertiesAtIndex(source, 0, NULL) Īdditionally, even on converting the data variable above to an image, it fails: NSData *data = ImageProperties = CGImageSourceCopyPropertiesAtIndex(source, 0, NULL) Source = CGImageSourceCreateWithData((_bridge CFDataRef)data, NULL) Now, when I try to read back the EXIF metadata imageProperties here shows the metadata I expect: NSData *data = I have some EXIF stored in a UIImage that I store using NSFileManager writeToFile:atomically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |