如何将 EXIF 标签放入 JPG 中,并在 C++ 中拥有原始 jpeg 缓冲区?
我遇到了一点问题。
我从相机获取 RAW char* 缓冲区,我需要添加此标签,然后才能将其保存到磁盘。 将文件写入磁盘并再次读回不是一种选择,因为这种情况会发生数千次。
除了宽度、高度和每英寸像素数之外,我从相机接收到的缓冲区数据不包含任何 EXIF 信息。
有任何想法吗? (C++)
I am having a bit of a problem.
I get a RAW char* buffer from a camera and I need to add this tags before I can save it to disk. Writing the file to disk and reading it back again is not an option, as this will happen thousands of times.
The buffer data I receive from the camera does not contain any EXIF information, apart from the Width, Height and Pixels per Inch.
Any ideas? (C++)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
有什么不同? 为什么对磁盘上的文件执行此操作与在内存中执行此操作有什么不同?
从磁盘读取文件后,只需执行任何操作即可。
What's the difference? Why would doing it to a file on the disk be any different from doing it in memory?
Just do whatever it is you do after you read the file from the disk..
据我所知,JPEG 中的 EXIF 数据是文件的连续子部分。
因此,
As far as I know EXIF data in JPEG is continuous subpart of file.
So
您可能想查看 Exiv2 库。 我知道它可以处理文件,但我想它也有处理内存缓冲区的功能。
You might want to take a look into Exiv2 library. I know it can work on files but I suppose it also has functions to work on memory buffers.
看看这个 PDF,第 20 页上有一个图表,显示您要放置或修改你的exif信息。 与磁盘上的文件有什么区别?
您相机的 JPEG 缓冲区是否已包含 EXIF 部分?
Look at this PDF, on page 20 you have a diagram showing you were to place or modify your exif information. What is the difference with a file on disk ?
Does the JPEG buffer of your camera contain an EXIF section already ?