CR2 files and re-appearing ratings...

Started by Mario, June 20, 2014, 03:38:17 PM

Previous topic - Next topic


You know your CR2 files have a rating, but IMatch does not show it?
You change the rating for your CR2 file in IMatch, but after writing back the data, the rating reverts back to none?
Read on for an explanation and a solution.

Some Canon camera models write an XMP record into the CR2 file, even if you  don't use any of the camera feature to rate files. The camera just writes Rating='none' into the XMP record if you don't specify a rating.

Usually, RAW files should always use XMP data stored in separate XMP sidecar files. This is not only faster, but also compatible with a wide range of other applications. A RAW file with an embedded XMP record and a XMP sidecar file is unusual and may lead to subtle problems when processing the metadata.

The way IMatch imports metadata from RAW files and sidecar files via ExifTool merges XMP data embedded in the file (if any) with the XMP data from the XMP sidecar file (if any) and XMP data produced by IMatch when importing legacy IPTC, EXIF and GPS data into the XMP record.

If a RAW file has embedded XMP data, this data is considered more important that the XMP data read from the sidecar file. This means that embedded XMP data overrides XMP data in sidecar files. For example, the XMP sidecar file indicates a rating of 3, but the XMP record embedded in the CR2 has a rating of 'none', IMatch displays the file without a rating.

If you change the rating in IMatch and write back the data, IMatch by updates the XMP sidecar file (default setting for RAW files is to not change the RAW file!). The XMP sidecar file receives the new rating, but the embedded XMP record still has a rating of 'none'! When IMatch re-imports the metadata afterwards, the 'none' rating from the embedded XMP overrides the new rating read from the XMP sidecar file! The old rating re-appears...

If this happens with your files, there are two options to deal with it:

The clean solution

Remove the unwanted XMP record from the CR2 file with the ExifTool Command Processor in IMatch. There is a Delete XMP Metadata preset available for this purpose.

Ignore embedded XMP data

Under Edit > Preferences > Metadata 2: File Formats you can configure the CR2 format to favor external XMP data. If this is enabled, IMatch ignores embedded XMP data if a XMP sidecar file is found. Note: This may solve the problem in IMatch, but other software may still use the embedded XMP in the CR2 file.
-- Mario
IMatch Developer
Forum Administrator  -  Contact & Support - Follow me on 𝕏 - Like on Facebook