Archive

Archive for the ‘Q & A’ Category

THM Files

August 6, 2010 Leave a comment

THM by Impulse Photo Guy

What are THM files?

THM files are THuMbnails that are automatically generated alongside certain larger photo and video file types, such as Canon’s RAW (.CRW) and movies (.AVI). The THM file format is essentially identical to the JPEG File Format (JFIF) — in fact, renaming a suitable (i.e. small) .JPG image file to .THM effectively creates a THM thumbnail. Similarly, renaming a *.THM file to *.JPG will allow you to double-click and open in a photo viewer.

In addition to the compressed image data, a JPEG file contains a series of markers that carry useful metadata — details about how the photo was taken, camera settings, etc. While most of this metadata is written by the camera itself, some items are done by the user by a catalog / photo browser program. These details include titles, descriptions, keywords and many other fields (even GPS coordinates!).

The specification of the JPEG (or THM) file format is openly published, and so inserting in additional metadata into a file is generally no problem. Unfortunately RAW file formats (e.g. .CRW or .CR2 in the case of Canon) are proprietary and not published. Therefore, it is very difficult (or risky) for a third-party program to make modifications to these files, such as the addition of metadata content.

Since Canon (and other manufacturers) realize that a) they want to keep their RAW format secret and b) they must allow some means for people to annotate the metadata, the solution is to create a “buddy file” mechanism. THM files are the buddy-files associated with Canon RAW files.

A .THM file is simply a small JPEG preview image that is used to house all of the writeable metadata content that would otherwise be written into the associated RAW file. The THM and RAW file must have exactly the same name, and any file operation (copy, move, delete) must be done to both in order to maintain the link.

Therefore, you might find a 20061015_1234.CRW along with a 20061015_1234.THM file in your image directory.

Why do you need to write metadata?

Ideally, you would have a writeable metadata format associated with all images in your database. This allows you to associate metadata (e.g. IPTC) with each image.

Advantages of being able to write the metadata:

  • Allows rebuild of catalog database categories should the database get corrupted
  • Allows export to another catalog program

RAW files require a buddy .THM file to accomplish this update with third-party utilities.

Can I delete THM files?

While these THM files might appear to clutter up your image directories, try to avoid the temptation in deleting them! Eventually, you may run into problems when managing the RAW files within a digital asset management program (photo catalog database), where you may want to associate additional metadata with the images.

If you did delete them, then please check out the article: recreating THM files from RAW.

Unfortunately, it’s easy to accidentally delete these .THM files when you are working in an environment that isn’t buddy-file aware (such as Windows XP). Most aware environments will perform the same operation on the original and associated buddy file (rename, copy, delete). Doing this outside such an editor can cause the association to become broken.

I discovered that a number of my older RAW files were missing the associated THM file, which was immediately flagged by catalog program as soon as I tried to open up an IPTC editor window.

Categories: Q & A, Tech, Uncategorized