ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:53:55 AM

Title: Writing New Metadata into .CRW from 300D
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by culture on 2006-07-23 16:41:39-07]

Firstly, many thanks to Phil for writing such a superb utility.  Secondly, apologies in advance for what I fear is a mind-numbingly basic question which is probably covered in the documentation somewhere ( but I couldn't find this over the couple of months I have been wrestling with this).

I'm trying to add metadata such as copyright, comments etc to CRW files cut by my Canon 300D.  To this point I have failed.  If the metadata already exists, then I am able to alter it, but if the item does not exist then I get something like the example below and no group & metadata added:

 
>exiftool.pl -v5 -comment="this is a comment" -IFD0:copyright="2006" 1.crw

Writing PNG:Comment

Writing Comment:Comment

Writing IFD0:Copyright

  Rewriting 1.crw...

  Rewriting MakerNotes

  Rewriting ImageProps

  Rewriting MakerNotes

  Rewriting MakerNotes

  Rewriting MakerNotes

  Rewriting MeasuredInfo

  Rewriting ImageDescription

  Rewriting CameraObject

  Rewriting MakerNotes

  Rewriting CameraSpecification

  Rewriting ExifInformation

  Rewriting MakerNotes

  Rewriting MakerNotes

  Rewriting MakerNotes

  Rewriting MakerNotes

Rewriting MakerNotes

  Rewriting MakerNotes

  Rewriting MakerNotes
   
0 image files updated
   
1 image files unchanged

All help and suggestions will be gratefully received, so thanks in advance.  
Neil...
Title: Re: Writing New Metadata into .CRW from 300D
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by exiftool on 2006-07-24 11:51:01-07]

Hi Neil,

The question is not basic.  The topic of meta information is complex.  Unfortunately, in CRW images Canon
hasn't defined a place where copyright information can be stored.  Ideally, they would have allowed a CRW
to support XMP, making it extensible and allowing you to store information such as this.

However, comments can be written to a CRW, but the tag name is "UserComment".  (See
CanonRaw Tags
for a complete list of CRW tags.)
Title: Re: Writing New Metadata into .CRW from 300D
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by culture on 2006-07-24 19:05:35-07]

Phil,  Thanks for the quick response.

Just so I am clear in my own mind, I wonder if you can clarify the situation further.  My understanding (now) is that, unlike other filetypes, Canon CRW files cannot have new groups defined in them, and that only items in groups [FILE] [CANONRAW] and [CANON] can be altered (assuming the fields are writeable).

If the statement above is correct then I need to rethink my intended workflow since I was intending to place the Lat & Long in the CRW.

It seems that I either have to convert the CRWs into another form (TIFF / DNG / PSD?) or keep the THM around as a repository for the metadata that I wish to create.  Should I be swayed in any particular direction?

Thanks in advance, Neil...
Title: Re: Writing New Metadata into .CRW from 300D
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by exiftool on 2006-07-25 12:33:41-07]

Hi Neil,

I was going to mention this, but didn't want to confuse things further.  I didn't think it was an issue because the tags you want to add don't even exist in the CRW specification.  However, you are correct, tags can neither be added nor deleted from MakerNote information (with some exceptions), and both Canon and CanonRaw information are considered MakerNote.

So, basically the only tag you have available is the UserComment tag (which should appear as an empty comment in every CRW image).  There is no reason you can't write latitude/longitude (and whatever else you want) to the UserComment tag as long as you keep the string length to less than 255 characters.  Using this tag would be simpler than maintaining a separate image for the meta information.

Another possible alternative (depending on your workflow) would be to convert the CRW to a DNG image (using the Adobe DNG Converter), then add the meta information to the DNG.

- Phil