如何在不加载图像的情况下为文件系统上的现有图像编写或修改EXIF数据? [英] How to write or modify EXIF data for an existing image on the filesystem, without loading the image?

查看:114
本文介绍了如何在不加载图像的情况下为文件系统上的现有图像编写或修改EXIF数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之前我曾问过类似的问题,但没有收到明确的答案。似乎必须有一种方法可以简单地向图像添加/修改元数据,而无需将图像加载到内存中,而无需直接读取位。

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.

似乎有点像使用 CMSampleBufferRef 时存在,但我需要能够将已保存到磁盘的常规图像执行此操作。

例如,给定一个大 png /Documents/photo.png ,我想修改其exif元数据而不必加载该图像。

Seems like ways exist when using CMSampleBufferRefs, 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.

推荐答案

你可以使用libexif - 之前我已成功为iOS编译它。使用libexif,您可以修改任何图像的EXIF元数据。

You can use libexif - I've had success with compiling it for iOS before. With libexif, you can modify any image's EXIF metadata.

这篇关于如何在不加载图像的情况下为文件系统上的现有图像编写或修改EXIF数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆