Reputation: 6317
I've asked similar questions before, but have not received a definitive answer. Seems that there must be a way to simply add/modify metadata to an image without loading the image into memory, without having to deal with directly reading bits.
Seems like ways exist when using CMSampleBufferRef
s, but I need to be able to do this with a regular image already saved to disk.
For instance, given a very large png
at /Documents/photo.png
, I want to modify its exif metadata without having to load that image.
Upvotes: 5
Views: 4473
Reputation: 6338
If you know how to modify the EXIF, you can modify the binary data directly from the file. Just replace in the image the binary portion with the new one. I don't know if objective-c permit this, but in ansi c should be simple. The complicate part is to identify the exact part to change.
Upvotes: 0
Reputation:
You can use libexif - I've had success with compiling it for iOS before. With libexif, you can modify any image's EXIF metadata.
Upvotes: 9