[Originally posted by photonoxx on 2009-11-23 14:38:08-08]
Hi,
Following an issue I encount using Digikam/exiv2 to edit my Nef's metadatas, I found a possible solution. It appears the tag MakerNotes:ColorHue (or Nikon:ColorHue) is missing in the corrupted files.
I try to add this tag to the file, but it seems impossible to create it. I try to obtain this with a -tagsFromFile command, but it seems impossible to get only this specific tag to be copied and some data aren't preserved (the most visible result is the thumbnail look like the source file and not to the Dest file).
So, as I'm not very familiar with exiftool command line, I ask myself if there's a way to Set a newly created MakerNote:ColorHue tag on my corrupted file with the appropriate value (for my NEF files it seems to be 'MODE3') and only that !
Thanks a lot
Light&peace
Nicolas
[Originally posted by exiftool on 2009-11-23 14:43:24-08]
Hi Nikolas,
ExifTool will not add or delete individual makernote tags.
There are various reasons for this, but one big reason is to
avoid potential problems with OEM software reading the images.
So the only way to do this is to copy the entire makernote block.
- Phil
[Originally posted by photonoxx on 2009-11-23 15:26:00-08]
Thanks Phil,
I understand this reasons because it is exactly the matter I have, this makernotes tag is deleted when I edit metadatas but not the others.
Does it possible in this case to use multiple -tagsFromFile from 2 different files (one with ColorHue and my corrupted file) to recreate an entire makernotes which keeps my original makernotes and add ColorHue missing tag ?
If yes, how ? Because I try different things with no success.
Thanks
Nicolas
[Originally posted by exiftool on 2009-11-23 15:40:29-08]
Hi Nicolas,
Unforunately you must do this in 2 steps. Although
it is possible to use -tagsFromFile to copy tags
from 2 different files in the same command, the
makernotes are copied as a binary block and can't
currently be edited in the same step.
So you will have to do this in 2 separate commands.
- Phil
[Originally posted by photonoxx on 2009-11-23 15:56:33-08]
So if I understand I have to :
- Extract in separates files the MakerNotes Binary block of my corrupted files
- Edit this extracted files to add the ColorHue tags and value
- Modify the corrupted files with -tagsFromFile 'Myextracedfiles'
It is that ? It makes three stages but... may be two commands ?
If yes, how can I edit Binary extracted files ? Is it simple enough to do it with a batch ?
Thanks again
Nicolas
[Originally posted by exiftool on 2009-11-23 16:17:15-08]
Hi Nicolas,
Your 2nd step won't work because you can't add makernote tags.
Sorry, I should have thought about exactly what you were trying
to do -- I don't think editing the colorhue tag will help
you because you must start with a properly-structured
makernote block (ie. no missing tags), and the only
reasonable way to do this is to get it from the original
image.
But then we are back to the technique you described in
your previous thread.
- Phil
[Originally posted by photonoxx on 2009-11-23 16:42:50-08]
Hi Phil,
I'm going to think there's no hope to do something with cleanest way...
But I'll continue to look for a solution...
I can notice if the tag exist in the MakerNotes you can edit it. right ? (I succeed apparently to modify the value of my reference file (with ColorHue tag existing)
So, may be in this case it is possible to copy MakerNotes as a binary block from a good file to a corrupted one, and after that set this new file with the values, when they exits, from corrupted file ? Is that possible to do and how ?
If the only thing I can't fix is the included thumbnail which match with the reference file, it's not insuperable as true CaptureNX can regenerate it, even if I don't understand why the thumbnail is in makernotes.
Thanks again, especially for troubles which are not generated by Exiftool
Nicolas
[Originally posted by exiftool on 2009-11-23 17:37:30-08]Hi Nicolas,
Yes, ExifTool can edit the Nikon ColorHue tag if it exists.
"So, may be in this case it is possible to copy MakerNotes as
a binary block from a good file to a corrupted one, and after that
set this new file with the values, when they exits, from corrupted
file ? Is that possible to do and how ?"
I don't recommend this. If you try to set all of the makernote tags
individually ExifTool can only write the tags which are currently
known, so this may cause conflicts with some of the unknown
information. The thumbnail isn't a problem because you can use
exiftool to copy this.
It really is best to start from your original backups. If those
don't exist, then the only possible option I see is to modify
exiftool to allow you to add the missing tag to the problem
images. It is a relatively easy change to make if you are
running the Perl version of exiftool. If so, I could make
the change and send you the patched source code for you to
try this out.
- Phil
[Originally posted by photonoxx on 2009-11-23 18:42:39-08]
Thanks Phil,
Yes, unfortunately it miss me a certain quantity of pictures (backup after the issue but before I notice it).
Finally, Sylvain Crouzillat (from Digikam user list) give a method to restore some picture with CaptureNX.
In fact I open a good version with captureNX, I copy camera parameter for colour mode after setting it to Mode3 and finally I have to paste this parameter on a corrupted file.
I don't think it could work because it initially doesn't want to open the file, but apprarently, it just open metadatas in this case and can modify them.
Thanks you anyway for your proposal about modify Exiftool code, it'll probably faster than CaptureNX but I don't want take more of your time.
And thank you especially for coding exiftool which are my favourite picture import tool for renaming and move into ordered path my photos.
Amicably, Nicolas
[Originally posted by exiftool on 2009-11-23 19:04:06-08]
Hi Nicolas,
I'm happy that you found another solution, and am
hopeful that it will solve your problems.
- Phil