ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: romanholiday on August 21, 2022, 01:37:40 AM

Title: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on August 21, 2022, 01:37:40 AM
I use Geotag Photos Pro to add location to my RAW files. Geotag Photos Pro uses exiftool version 12.42 internally.

Well, sadly tagging fails with any RAW file from the Panasonic Lumix GH6 camera. I get the error message:-

Error: No size tag for IFDO:RawDataOffset

Then I tried using the latest command line exiftool version 12.44 and any attempt to write '-gps*' tags results in the same error message:-

Error: No size tag for IFDO:RawDataOffset

So, it this a limitation of exiftool? Are you aware and hope to resolve this issue soon?

Many thanks for an incredible useful utility that is exiftool  :)

Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: StarGeek on August 21, 2022, 12:45:16 PM
It sounds like there's a big problem with the EXIF in that file.

What is the result of this command (replace "file.cr2" with your actual file)
exiftool -g1 -a -s -warning -validate file.cr2

This may require Phil's attention.  Can you make a sample file available in case Phil needs to look at it to see the problem?
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on August 21, 2022, 03:05:25 PM
Thanks for your help StarGeek.

I ran the command and this is the result:-

---- ExifTool ----
Warning                         : [minor] Non-standard EXIF at TIFF-IFD0-JPEG-APP1-IFD0
Warning                         : [minor] Undefined value for MakerNotes:ClearRetouchValue
Validate                        : 2 Warnings (all minor)

I have some RAW files from the GH6 on my Google Drive. I can send you the link so that you can download them.

Thanks again.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on August 21, 2022, 03:10:36 PM
I sent you a private message with a link to my Google Drive share. Thanks.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on August 21, 2022, 03:16:02 PM
I can reproduce this behaviour with a sample GH6 RW2 file I have at hand.  I'll look into fixing this.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on August 21, 2022, 04:06:29 PM
Thank you Phil!

I look forward to the fix soon...  :)

Thanks again for making such a wonderful tool.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: StarGeek on August 21, 2022, 04:23:22 PM
Quote from: romanholiday on August 21, 2022, 03:10:36 PMI sent you a private message with a link to my Google Drive share. Thanks.

I forwarded the link to Phil in case he needs it.

Took me too long to figure out where to look at my messages.  Forgot all that had been moved to the very top of the page.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on August 23, 2022, 08:18:06 AM
I have a patch in place to address this issue but don't have any software that will display a GH6 image so I need some help with testing.

Could you verify that this ExifTool-edited image can be viewed OK with your software?:

https://exiftool.org/tmp/PanasonicDC-GH6.rw2

Thanks

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on August 24, 2022, 05:27:10 PM
I am so sorry for my late reply. I did not get any alerts about your post.

Anyway, I imported the file you supplied into Lightroom Classic and all seemed fine. The photo is of trees in a swamp/marsh. Then I tried to export it and it gave an error message "The file appears to be unsupported or damaged". If I go to the Develop module it says the same thing.

Then I tried importing it into the new non-classic Lightroom and it would not even import giving the same error message.

Sorry to be the bearer of this bad news  :-\
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on August 24, 2022, 09:13:57 PM
OK, thanks.  Unfortunately I can see nothing wrong with the file.  I need to see if I can find some utilities to display this file so I can do some testing myself.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: herb on August 25, 2022, 09:51:31 AM
Hello everybody,

As far as I understand has the Panasonic DC-GH6 a new "image-encoding-format".
I found this info at LibRaw: https://www.libraw.org/node/2710 (https://www.libraw.org/node/2710)

Just my 2 cents
Best regards
herb
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Hubert on August 25, 2022, 03:00:58 PM
On MacOS at least, there is practically no support for .rw2 images shot with a GH6. Even straight-out-of-camera files (downloaded from DP Review (https://www.dpreview.com/sample-galleries/7519685592/panasonic-gh6-sample-gallery/1457424796)) do not display correctly in Affinity Photo or Graphic Converter.

I don't subscribe to Photoshop so I can't test with it, but Adobe's free DNG Converter (v 14.5) does convert straight-out-of-camera .rw2 files to .dng format. Unfortunately it errors with modified sample uploaded by Phil.

XnViewMP.app does display Phil's image and straight-out-of camera samples but I think it's probably using the embedded .jpeg thumbnail rather than the raw image data.

Attached are screen grabs of a straight-out-of-camera .rw2 file from a Panasonic GH6, as opened in Affinity Photo:

Screenshot 2022-08-25 at 07.10.13.jpg

 and Graphic Converter:

Screenshot 2022-08-25 at 07.12.03.png

Results with Phil's modified sample are pretty much identical.

Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: wywh on August 26, 2022, 05:46:55 AM
The latest Mac Adobe Lightroom Classic 11.5 or Adobe Photoshop 2022 23.5.0 can open a sample file P1010259.RW2 at:

https://www.dpreview.com/sample-galleries/7519685592/panasonic-gh6-sample-gallery/1457424796

But that exiftool-edited file fails with:

"Could not open "PanasonicDC-GH6.rw2" because the file-format module cannot parse the file"

- Matti
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on August 26, 2022, 06:17:07 AM
Thanks everyone.  Obviously some work needs to be done here, so the 12.45 release will be delayed for at least a couple of weeks.  I don't want to update my MacOS 10.14 system so I need to find something that will convert/display these files on older Mac systems.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: StarGeek on August 26, 2022, 10:23:37 AM
Quote from: Phil Harvey on August 26, 2022, 06:17:07 AMso I need to find something that will convert/display these files on older Mac systems.

Adobe Bridge will display the sample @romanholiday sent me, but won't display the edited sample.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 01, 2022, 07:20:22 PM
Hi again,

Just wondering if there is any progress/update?  :o

Thanks.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: StarGeek on September 01, 2022, 08:14:58 PM
Phil is currently away and will be back next week.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 07, 2022, 05:19:01 PM
Is Phil back?  ;D
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 11, 2022, 01:15:18 AM
Any update? My GH6 is gathering dust...  :'(
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 11, 2022, 06:47:32 AM
Sorry for the delay.  This is likely going to take a couple more weeks.  I have to be very careful when writing raw files, and it will take time to test this properly.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 11, 2022, 12:57:43 PM
Thanks for the update and good luck!  :)
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 16, 2022, 01:11:06 PM
Wow.  What a time waster. :(

I spent some time trying to find some Adobe software that runs on MacOS 10.14 to view the GH6 RW2 files, but the new software doesn't work on my system (after going through half of the install procedure and downloading 2GB of stuff, the Adobe Bridge installer finally informs me that I need to upgrade my system before installing.  Thanks Adobe), and the old software doesn't load GH6 files.

But I found a version of SilkyPix that works on my system and shows the same problem.

That was the good news.  Now for the bad news:

I can change everything in the RW2 file except for the location of the raw data, and the file views fine in SilkyPix.  But as soon as I move the raw data to any other offset, the image gets corrupted in SilkyPix.  I can use ExifTool to edit the file fine, as long as I insert enough padding to keep the raw image at the same location.

I did a binary search for pointers that may need updating, and did find another pointer hiding in IFD0:PanasonicRaw_0x0044, but updating this didn't help.  And surprisingly, if I set IFD0:RawDataOffset to all zeros in the original image it still displays OK.  So the raw data offsets in the file are not used.  All I can do is assume that these offsets have been hard coded for this camera model.  I can't express how insanely bad form this is for the Panasonic programmers.  It is bad enough to have 2 pointers to the raw data (there should only ever be one pointer to one piece of data), but to ignore them both and hard code the offset is another level of stupidity.

The bottom line is that I won't be able to enable writing these RW2 files until Panasonic and Adobe can fix their software to use the stored offset(s) properly.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 16, 2022, 05:40:38 PM
This is terrible news.

What exactly do you mean when Panasonic fix their software? Does this mean we have to wait for a firmware update for the camera?

Also, is this just bad programming or done deliberately by Panasonic so that EXIF data cannot be altered?

Thanks.
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 16, 2022, 09:22:32 PM
I doubt that it was done deliberately.  More likely it is lazy programming.  Of course, this sort of laziness results in more work and problems down the road for everyone involved.  :(

If I am correct, it is the raw viewer software that is the problem.  A camera firmware update won't help.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 16, 2022, 09:45:42 PM
Forgive me if this is a dumb question, but what does the Panasonic Raw Viewer software have to do with altering the exif data in a RAW file that will go straight to Adobe Lightroom/ACR or Capture One or any other software? It will never even touch any Panasonic software!

 ???
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 16, 2022, 10:00:40 PM
I don't know how adobe gets the algorithm for decoding raw images, but I'm guessing they got it from the Panasonic programmers because both Adobe and Panasonic software have the same behaviour here.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: wywh on September 17, 2022, 06:26:06 AM
Maybe you could use Adobe DNG Converter as a workaround. exiftool can insert GPS to such .RW2 converted to .dng.

I used Adobe DNG Converter for a while when waiting macOS support for Canon EOS R6 .cr3.

https://helpx.adobe.com/camera-raw/using/adobe-dng-converter.html
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 17, 2022, 06:54:46 AM
While Adobe DNG Converter has had its own issues, Matti's idea is a good one.

However, I've had time to settle down a bit and may consider an ExifTool patch to keep the raw data at a fixed offset.  I've always resisted this because it will limit what you are able to write to the file, but maybe I should try this here.

Can you tell me if the following ExifTool-edited file can be opened in your viewers?:

https://exiftool.org/tmp/test_fixed_offset.rw2

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: wywh on September 17, 2022, 07:07:56 AM
Quote from: Phil Harvey on September 17, 2022, 06:54:46 AMCan you tell me if the following ExifTool-edited file can be opened in your viewers?:

https://exiftool.org/tmp/test_fixed_offset.rw2

macOS 12.6 Preview or Photos or GraphicConverter 11.6.2 can not open it.

Photoshop 2022 23.5.1 and Lightroom Classic 11.5 open it OK.

- Matti
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Hubert on September 17, 2022, 09:10:44 AM
Adobe DNG Converter 14.5.0.1177 converts it successfully.

But Affinity Photo 1.10.5 opens it like this:

Screenshot 2022-09-17 at 14.01.37.png

And Graphic Converter 11 like this:

Screenshot 2022-09-17 at 14.05.33.png

Sorry...
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 17, 2022, 05:27:48 PM
Quote from: Phil Harvey on September 17, 2022, 06:54:46 AMWhile Adobe DNG Converter has had its own issues, StarGeek's idea is a good one.

However, I've had time to settle down a bit and may consider an ExifTool patch to keep the raw data at a fixed offset.  I've always resisted this because it will limit what you are able to write to the file, but maybe I should try this here.

Can you tell me if the following ExifTool-edited file can be opened in your viewers?:

https://exiftool.org/tmp/test_fixed_offset.rw2

- Phil

This trick worked! So I can batch convert the RAW files to DNG and then tag them as normal. Any disadvantage to this? Is anything lost in the DNG file?

Thanks  ;)
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 17, 2022, 08:39:18 PM
Thanks all.

Wow, what a mess!

So the Panasonic software I tested and Adobe software can open the edited file, but MacOS 12.6, GraphicConverter and Affinity Photo can't.  Maybe I should have posted the original for comparison, but I think at this point I don't think it makes sense to try to add write support for this type of file.  :(

The best option is to convert to DNG.  This is what I do with my D500 NEF files (just because my version of LightRoom won't open them), but check to be sure they contain all the metadata you want because the DNG converter drops some makernote information for some models.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 17, 2022, 10:47:43 PM
Affinity Photo can't open normal untouched files from the GH6 anyway - the same yellow/green garbage is displayed. So I think you new method is working...  ;D
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 18, 2022, 08:10:33 AM
OK, so that gives me some hope.  Here is the original file.  It needs to be tested on MacOS 12.6 and GraphicConverter:

https://exiftool.org/tmp/original_gh6.rw2

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: wywh on September 18, 2022, 08:28:34 AM
Quote from: Phil Harvey on September 18, 2022, 08:10:33 AMHere is the original file.  It needs to be tested on MacOS 12.6 and GraphicConverter:
https://exiftool.org/tmp/original_gh6.rw2

macOS 12.6 Preview.app, Photos.app or QuickLook or GraphicConverter 11.6.2 can not open it.

- Matti
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 18, 2022, 08:59:08 AM
OK, thanks.  So it seems that all tested apps behave the same for the edited file and the original file.

I guess that's a "go" then.  I'll look into adding this patch, even though I am philosophically opposed to patches like this because writing will fail (and ExifTool will have to return an error) if you try to add metadata which is too large to fit before the fixed position of the raw data in the file.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 18, 2022, 10:50:48 AM
Patch complete, but it requires more testing.

Do you have the ability to run the pure Perl version of ExifTool?  (ie. Do you have Perl installed?)  I have uploaded a patched version of the pure-Perl ExifTool distribution for testing.  This version maintains a fixed offset for the raw data in these images:

https://exiftool.org/Image-ExifTool-12.46p.tar.gz

With this version you will get the following error if you try to write metadata that is too large:

Error: Metadata too large to fit before fixed-offset image data
but if the metadata fits, you will get a warning like this:

Warning: [minor] Adding 15370 bytes of padding before fixed-offset image data
SilkyPix can load my sample GH6 and GH5M2 RW2 files after editing it with this version, but I haven't done any other testing yet.

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 18, 2022, 10:33:41 PM
I have a Mac and I did a "which exiftool" and it is located in /usr/local/bin. It is just one executable file:-

-rwxr-xr-x 1 myusername wheel 304K Jul 21 03:31 exiftool

It is version 12.44.

Then I renamed this exiftool to exiftool_old and I uncompressed your archive and moved just the one file from there "exiftool" to /usr/local/bin.

When I run "exiftool -ver" it says:-

12.46 [Warning: Library version is 12.44]

Have I done something wrong?
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 18, 2022, 10:40:34 PM
It seems that as well as the file "exiftool", the whole directory "lib" also needs to be copied to /usr/local/bin. So again I renamed my existing "lib" to "lib_old" and copied the new "lib" to /usr/local/bin.

Now it says:-

12.46 (pre-release)

So I guess I have it successfully installed? Should I start playing with it? ???
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on September 19, 2022, 06:20:08 AM
Yes, start playing. :)

But you didn't need to copy it to /usr/local/bin -- you can run the new version of ExifTool from anywhere (see the very first Note at the top of the Installation page (https://exiftool.org/install.html)).

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on September 19, 2022, 08:21:46 PM
Looks good so far...  ;D
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on October 20, 2022, 04:12:06 PM
Hi again,

Is this fix included in the just released 12.49?

 :)
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on October 20, 2022, 08:43:12 PM
From the version history (https://exiftool.org/history.html):

Oct. 1, 2022 - Version 12.46 - "Write WEBP"
  - Added the abilty to write Panasonic GH6 RW2 files

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on October 20, 2022, 11:20:11 PM
So since 12.46? Nice!  ;D
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on October 21, 2022, 01:54:31 PM
Why is the "production" release still 12.42?  :-\
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: Phil Harvey on October 21, 2022, 02:09:52 PM
I try to keep the frequency of "production" releases down so I don't overwhelm maintainers with updates.  In reality, there isn't much difference.  But, as a matter of interest, I plan to make 12.50 a production release because it is about time (and we have arrived at a nice-looking number).

- Phil
Title: Re: Geotagging not working with Panasonic Lumix GH6
Post by: romanholiday on October 22, 2022, 08:33:50 AM
Sounds good!

 ;D