Is there any easy way to edit jpeg marker data in-place?

拥有回忆 提交于 2019-12-12 04:48:09

问题


I am trying to edit jpeg marker data (eg: exif data) in APP0 section. I used libjpeg to decompress the source file to get exif data and uncompressed image data. I used libexif to modify exif data. Then I compressed the source image data and modified exif data to create a new jpeg file.

Instead of doing decompressing and compressing again, I am wondering if there is any way to edit JPEG metadata without re-compressing the original image?

(Looks like, I can call jpeg_write_header or jpeg_write_marker only after jpeg_start_compress and before jpeg_write_scanlines function calls. Can I tell the compressor that source data is already compressed and we just want to update/write the header/marker information).

来源:https://stackoverflow.com/questions/10508410/is-there-any-easy-way-to-edit-jpeg-marker-data-in-place

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!