Hello,
I'm a french user and i bought a Sony DXC-HX20V with GPS. This camera store in EXIF tag position and orientation information.
When l view my picture on Geosetter, the orientation of them are wrong (an offset of 90 degree !)
I see Sony Faq and i see they produce a new firmware release that fix the bug.
But I want to fix picture they whas produce whith "old firmware".
Can I use Exiftool to modify my 996 pictures for applicate an négative offset of 90 degrees ???
What's the command line ?
Thank's.
Excuse for my english ...
You can do this with a user-defined tag and a command like this:
exiftool "-gpsimgdirection<mydirection" FILE
where FILE is the name of your image file, and MyDirection is a user-defined tag similar to the MyTilt tag in this post (https://exiftool.org/forum/index.php/topic,4432.msg21077.html#msg21077).
See the sample config file (https://exiftool.org/config.html) for instructions on activating the config file for the user-defined tag.
- Phil
Edit: Fixed errant quote in exiftool command
Ok, thanks for your help.
I try it on a picture and it's works.
For angry Sony user, modify .ExifTool_config and add this :
'Image::ExifTool::Composite' => {
MyDirection => {
Require => 'GPSImgDirection',
ValueConv => '$val - 90',
},
},
and then, write on command line tool :
exiftool "-GPSImgDirection<MyDirection" FILE
Enjoy.
Thanks.
Another user just reminded me that ExifTool's increment feature may also be used to do this:
exiftool -gpsimgdirection+=-90 FILE
However, this may result in negative numbers, which could be corrected like this:
exiftool -gpsimgdirection+=360 if '$gpsimgdirection < 0' FILE
Where FILE is one or more directory and/or file names. Note that the quotes above are for Mac/Linux. In Windows use double quotes instead.
- Phil
Hello,
I just try it but it doesn't works
The return is :
" Warning : Can't Add GPS:GPSImgDirection (not a list type).
The increment fonction don't work because the command
exiftool -gpsimgdirection=90 FILE work.
What's wrong ?
The command with If Test don't work too.
Thank's
I try a new test.
The command line :
exiftool -GPSImgDirection=-90 FILE
don't work. I can't fix negative value for GPSImgDirection field.
I need help. Can you modify the first method with ExifTool_Config file and add a test sequence like :
If value >= 90 then newvalue = value - 90
Or if value < 90 the newvalue = value +270
For memorie,
'Image::ExifTool::Composite' => {
MyDirection => {
Require => 'GPSImgDirection',
If .....
ValueConv => '$val - 90',
Or ....
ValueConv => '$val + 270',
},
},
Thank's.
I found and it's work
Image::ExifTool::Composite' => {
MyDirection => {
Require => 'GPSImgDirection',
ValueConv => q{
return $val - 90 if $val >90;
return $val +270 if $val <90;
},
},
Right. I didn't realize that GPSImgDirection was an unsigned number, so you are correct that it can't go negative.
But the "+=" should still work for you to increment this value as long as the result is positive and you are using ExifTool 8.61 or later.
- Phil