Project

General

Profile

Bug #762

Fail to set metadata to a tif file

Added by Kent Fu over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
withdrawn
Target version:
Start date:
22 Feb 2011
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

I tried to set metadata to a tif, but return fail message "Invalid ifdId 98", Error from "tags.cpp",
ExifKey::ExifKey(uint16_t tag, const std::string& groupName)
: p_(new Impl) {
IfdId ifdId = groupId(groupName);
// Todo: Test if this condition can be removed
if (!Internal::isExifIfd(ifdId) && !Internal::isMakerIfd(ifdId)) {
throw Error(23, ifdId);
}
const TagInfo* ti = tagInfo(tag, ifdId);
if (ti == 0) {
throw Error(23, ifdId);
}
p_->groupName_ = groupName;
p_->makeKey(tag, ifdId, ti);
}
The "groupName" value is "(Last IFD item)", so runs "throw Error(23, ifdId);"
My command line like this:
exiv2 -M "set Exif.Image.DateTime 2011-01-01" c:\err.tif

And I use the 2.21 version.


Files

err.tif (11.5 MB) err.tif Kent Fu, 22 Feb 2011 19:10

History

#1

Updated by Kent Fu over 10 years ago

This bug appears in the multi-page tiff, when greater than 4 frame count.

#2

Updated by Guillaume Paumier over 10 years ago

I hit the same bug ("Invalid ifdId 98") while trying to add metadata to a TIFF picture in digiKam. (This is a bit annoying since many of my pictures are TIFFs, so I can't process them =)

Here's the bug report: https://bugs.kde.org/show_bug.cgi?id=271757

using LibExiv2: 0.21.1 compiled from source. Exiv2 says it can write to TIFF files.

Example file: http://dl.dropbox.com/u/17707983/DSC_9855.TIF (36.2 MB)

#3

Updated by Andreas Huggel over 10 years ago

  • Category set to tiff parser

Kent's comment is spot-on. This is a shortcoming of Exiv2 for TIFFs with more than four chained IFDs. Fixin this requires surgery on the TIFF parser and is not straightforward to do properly. As a workaround, it wouldn't be difficult to extend the list of known chained IFDs, say to 20.

Related to this is the issue that Exif group names should be assigned intelligently rather than statically. Historically, Exiv2 calls the group for IFD0 "Image" and that for the next IFD "Thumbnail", in line with the Exif specification. For multi-page TIFFs this doesn't make sense though. Something like "Image", "Image2", "Image3", etc. would be more appropriate.

#4

Updated by Robin Mills about 6 years ago

  • Target version set to 53
#5

Updated by Robin Mills over 5 years ago

  • Status changed from New to Assigned
  • Assignee set to Robin Mills

This issue has been in the database for 5 years and nobody else has requested progress with this matter. So, unless you engage to persuade me to keep this matter alive, it will be closed on April 30 as "no longer needed/wanted".

#6

Updated by Robin Mills over 5 years ago

  • Category changed from tiff parser to withdrawn
  • Status changed from Assigned to Closed
  • Target version changed from 53 to 0.26
  • % Done changed from 0 to 100
  • Estimated time set to 1.00 h

Also available in: Atom PDF