I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-02-22 08:12:20-08 by helpless
Need help to change the Exif's Focal Length in a .JPG file
Exiftool seems to be a great program, but it's just so complicated. All I need to do is to change the "Focal Length" tag in the exif of a .JPG file since my software (PSP Photo X2) resets the Focal Length to 0.00mm on some files when saved (I think it's a bug). I'd be greatful for a "step guide" for how to do this. I have a Canon EOS 50D. The program Exiftool is in the same dir as the file I want to change. Thanks in advance! :)
Direct Responses: 10044 | 10045 | 10054 | Write a response
Posted on 2009-02-22 12:00:28-08 by bogdan in response to 10043
Re: Need help to change the Exif's Focal Length in a .JPG file
Hi,

Try with:
exiftool -exif:FocalLength=50 MyImage.tif

Above works, but there's a problem I've noticed when using PSP X2 (v12.5). That is, PSP doesn't save Makernotes as it should (that is: Makernotes section is somewhat corrupt).
Because of that, exiftool will (by default) refuse to write into such image file. To make writting possible, you should use:
exiftool -m -exif:FocalLength=50 MyImage.tif
-which ignores "m"inor errors and thus writes metadata

Of course, you can delete complete existing Makernote section (it became useless anyway) and write FocalLength as shown in first example.

Greetings,
Bogdan
Direct Responses: Write a response
Posted on 2009-02-22 12:13:38-08 by exiftool in response to 10043
Re: Need help to change the Exif's Focal Length in a .JPG file
There are a few different ways to do this, and the step-by-step instructions depend on what operating system you are using and what method you want to use. If you are running Windows, then maybe the easiest thing to do is to just rename the "exiftool(-k).exe" program to something like "exiftool(-k -focallength=50).exe", then drag and drop the image(s) onto the icon for the program. (Use whatever focal length you want in place of "50" here.)

Doing this will open a terminal window which will show any messages from exiftool. As long as there were no errors, then the file should be updated to contain the new focal length, and the original image is backed up with a "_original" added to the file name.

Note: Don't add the ".exe" to the program name if it wasn't there before, because the extension is hidden in some Windows systems and it won't work if you add a 2nd one.

Good luck.

- Phil
Direct Responses: 10046 | Write a response
Posted on 2009-02-22 12:18:45-08 by exiftool in response to 10045
Re: Need help to change the Exif's Focal Length in a .JPG file
Hehe. Bogdan typed faster than me this time. :)

I told you there was more than one way to do it.

Bogdan is running the command from a terminal window (select "Run..." from the Start menu, and type "cmd" for the command to run -- this will open the terminal window.)

I didn't suggest this method because it is more involved. Before typing the exiftool command that Bogdan indicated, you first must use a "cd" command to change the current directory to the one containing exiftool and your image.

- Phil
Direct Responses: 10049 | Write a response
Posted on 2009-02-22 19:36:37-08 by igor77 in response to 10046
Re: Need help to change the Exif's Focal Length in a .JPG file
Hello!
May be it is possible and more convenient to copy Focal Length into file before use PSP and after using it return this tag into file. May be XMP file - I'm not specialist. This way we can save real Focal Length, not only 50 mm (or other one).
Igor
Direct Responses: Write a response
Posted on 2009-02-23 09:34:20-08 by helpless in response to 10043
Re: Need help to change the Exif's Focal Length in a .JPG file
I managed to get it work not that long after I wrote this thread. This is the string that worked: exiftool -FocalLength="250" test.jpg. One file got updated and so did the Focal Length! :) I'm running Windows XP and renamed the program to exiftool.exe to run with command line. Thanks guys -- and thanks for ExifTool!!
Direct Responses: Write a response