0

Is there a limitation in exiv2's functionality that prevents it from inserting the tag 'Exif.SubImage1.OpcodeList3' to a DNG file?

I am trying to copy this tag from one DNG file to another with no success.

My source file was printed using: exiv2.exe -b -pa file.dng > output.txt

The file output.txt contains: Exif.SubImage1.OpcodeList3 Undefined 184 0 0 0 1 0 0 0 1 1 3 0 0 0 0 0 0 0 0 0 164 0 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 62 10 191 117 109 20 1 60 213 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 240 0 0 0 0 0 6 191 185 168 230 29 114 106 51 63 154 226 203 140 13 160 159 191 117 201 88 36 225 127 123 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 63 223 227 192 112 254 60 7 63 224 0 0 0 0 0 0

I'm trying to add this tag to a different DNG file that doesn't have it by (for example) a command file: add Exif.SubImage1.OpcodeList3 Undefined "0 0 0 1 0 0 0 1 1 3 0 0 0 0 0 0 0 0 0 164 0 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 62 10 191 117 109 20 1 60 213 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 240 0 0 0 0 0 6 191 185 168 230 29 114 106 51 63 154 226 203 140 13 160 159 191 117 201 88 36 225 127 123 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 63 223 227 192 112 254 60 7 63 224 0 0 0 0 0 0"

But the file remains unchanged.

I also tried things like: add Exif.SubImage1.OpcodeList3 Undefined "0 0 0 1 0"

But still the tag is not added. I suspect that exiv2 doesn't support the insertion of this tag.

Am I doing something wrong or is this not supported?

Assaf
  • 184
  • 1
  • 11

1 Answers1

0

Problem solved: the answer here (with respect to OpcodeList1) explains why such a tag is not manipulated by exiv2. To overcome this, I changed tiffimage.cpp by replacing:

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

with:

        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;
        }
Assaf
  • 184
  • 1
  • 11