首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Exiv2标签插入支持

Exiv2标签插入支持
EN

Stack Overflow用户
提问于 2014-10-23 21:19:54
回答 1查看 149关注 0票数 0

Exiv2的功能是否有限制,使其无法将标记“Exif.SubImage1.OpcodeList3”插入到DNG文件中?

我正在尝试将此标记从一个DNG文件复制到另一个文件,但没有成功。

我的源文件使用以下命令打印: exiv2.exe -b -pa file.dng > output.txt

文件output.txt包含: Exif.SubImage1.OpcodeList3未定义184 0 0 0 1 0 0 0 1 1 1 3 0 0 0 164 0 0 3 63 240 0 0 119 176 58 28 191 185 132 79 191 248 95 209 63 154 58 10 83 149 10 191 117 109 20 1 60 213 11 0 0 0 63 240 0 0 0 6 6 191 185 168 230 29 114 106 51 63 154 226 203 140 13 160 159 191117 201 88 36 225 127 123 0 0 0 63 239 255 253 213 88 87 206 191 185 163 231 88 112 250 50 63 155 248 100 114 115 143 207 191 118 115 180 47 58 216 144 0 0 0 63 223 227 192 112 254 60 7 63 224 0 0 0

我正在尝试通过(例如)命令文件add Exif.SubImage1.OpcodeList3 Undefined "0 0 0 1 0 0 0 1 1 3 0 0 0 164 0 0 0 3 63 240 0 119 176 58 191 185 132 79 191 248 95 209 63 154 58 10 83 149 62 10 191 117 109 20 1 60 213 11 0 0 0 2 240 0 0 0 6 191 185 185168 230 29 114 106 51 63 154 226 203 140 13 160 159 117 201 88 36 127 123 0 0 0 63 239 255 253 213 88 87 206 191 185 163 231 88 112 250 50 63 155 248 100 114 115 143 207 191 118 180 47 58 216 0 0 0 63 223 227 192 112 254 60 7 63 224 0 0 0“

但该文件保持不变。

我还尝试了这样的操作:添加Exif.SubImage1.OpcodeList3未定义的"0 0 0 1 0“

但是仍然没有添加标签。我怀疑exiv2不支持插入这个标记。

我做错了什么吗?或者这是不受支持的?

EN

回答 1

Stack Overflow用户

发布于 2014-10-24 20:04:17

问题已解决:答案here (与OpcodeList1相关)解释了为什么exiv2不能操作这样的标记。为了克服这个问题,我更改了tiffimage.cpp,替换为:

代码语言:javascript
复制
        if (   pPrimaryGroups != 0
            && !pPrimaryGroups->empty()
            && group != ifd0Id) {
#ifdef DEBUG
            ExifKey key(tag, groupName(group));
            std::cerr << "Image tag: " << key << " (2)\n";
#endif
            return true;
        }

通过以下方式:

代码语言:javascript
复制
        if (   pPrimaryGroups != 0
            && !pPrimaryGroups->empty()
            && group != ifd0Id) {

            bool opcode3 = tag == 0xc74e;

#ifdef DEBUG
            ExifKey key(tag, groupName(group));
            if (!opcode3)
                std::cerr << "Image tag: " << key << " (2)\n";
            else
                std::cerr << "Not an image tag: " << key << " (2)\n";
#endif
            return !opcode3;
        }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26529062

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档