Before the rush

Before the rush
by evan-pak

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to share the RAW files my camera produces, including EXIF data, with the one exception that I want to remove the camera (and lens if that is also recorded) serial number(s) to avoid any opportunity for someone with bad motives to cause problems. I need to do this on Linux (preferrably distro neutral, source is better, but I do have Slackware and Ubuntu).

I have dcraw but it seems to not have any option to do this. I did find other tools to delete EXIF data or serial numbers, but all were for JPEG or PNG or TIFF. The appropriate tool would need to write out a new .CR2 file without the serial number(s), or zeros substituted for the serial number(s). But I want all the technical aspects to be available in these RAW files so people can do their own processing of them with whatever they have.

share|improve this question
This answer lists a product that can supposedly write metadata to some raw formats – Steven Cunningham May 15 '12 at 11:20
Want to avoid tools allowing to crawl internet looking for the serial number into exif? as exemple – floqui May 15 '12 at 15:18
The thief would not be using my process work flow. To catch a camera thief, it matters whether HE leaves the serial numbers on, or not. – Skaperen May 15 '12 at 20:12
up vote 1 down vote accepted

I think that exiftool should be able to do this work for you. I'm able to use it to read and write the temperature value to a tag in windows 7.

The exiftool webpage suggests that it can read and write maker tags, so serial numbers may be removable.

share|improve this answer
I tried the Linux (Ubuntu) version of this, after I found the oddball name someone gave it. It seems to be able to delete lots of tags, but it doesn't have a tag name for the serial number (lists it as "Camera Body No." for which there is no corresponding tag). Unfortunately, this is coded in a language I don't have the skills to read. – Skaperen May 15 '12 at 17:00
I looked at a CR2 file that I have from a friend with PhotoMe (a windows program). It looks like the tag name for body number is: CameraSerialNumber. – smigol May 15 '12 at 21:44
The .CR2 files from my 7D do not have such a tag. It should be listed on the exiftool output as "Camera Serial Number :" but that is not in the output. It should get listed when doing "exiftool -CameraSerialNumber myfile.cr2" but nothing is listed. I suspect the serial number is really stored in a hard coded field of Canon's .CR2 format, rather than in a tag. – Skaperen May 16 '12 at 0:26
I have found where the serial number, in binary form, is stored in the file. It is at offset 0x3e0 if 6 bytes, or 0x3e2 if 4 bytes, in little-endian byte order. I do not know if that position would shift based on other other content conditions. What I will try next is a C program to substitute those bytes with other values and see what effect I have (and also scan my other CR2 files for similarity). I am still concern an additional copy might be coded elsewhere in another format. – Skaperen May 16 '12 at 0:34
At 0x33c or 0x33e for my 450D. – Skaperen May 16 '12 at 0:44

In Windows, you can remove the serial by using the program "EXIF Cleaner", and choosing "Remove only the following tags", then selecting the MakerNote check only (MakerNote contains the camera manufacturing number).

share|improve this answer
Welcome! Perhaps you could include a link to the program's developer or download site? Thanks. – Michael Clark Apr 13 '13 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.