Page 1 of 2

JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 8th, 2019, 11:17 am
by BobP45
I'm using Windows 10 with 16GB ram and the PW8 5 Jun 2019 beta. I have the File save options for JPEG set to save ALL metadata. It usually works, but every once in a while it doesn't, and in this case the saved output JPEG file has no metadata in it. When it doesn't work, it turns out all the output files for an entire session of starting and exiting PW do not have any metadata in them, the original input files do. (I'm using a website and application where I need the GPS data for the images.) When I next start PW, the file save options for JPEG still specify to save all metadata.

I have not yet been able to determine a pattern which might cause this. I've seen the other threads in this forum about metadata and was assuming everything was ok. Is this a known problem in the 5 Jun version?

Thanks, Bob

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 8th, 2019, 12:21 pm
by jsachs
EXIF data is written to files by running a copy of ExifTool in the background to copy the metadata from the input image to the output image. Normally this works OK as far as I know. I am updating to the latest (11.49) release of ExifTool for the next release. Let me know if you have any more information about what triggers the problem.

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 6:20 am
by BobP45
It just happened again with the 19 Jun 2019 beta. An entire session of 31 saved image files lost their GPS data.
I was monitoring the saved images (with the S icon) with PWP's Image info... and all of them as seen by PWP had their metadata intact. It wasn't until I started using these images in another application that I discovered the metadata for all 31 images was not preserved in the saved files.

Original image camera and GPS metadata:
Image camera metadata - original.jpg
Image camera metadata - original.jpg (32.46 KiB) Viewed 3859 times
Image GPS metadata - original.jpg
Image GPS metadata - original.jpg (10.61 KiB) Viewed 3859 times

Saved image camera and GPS metadata:
Image camera metadata - as saved.jpg
Image camera metadata - as saved.jpg (31.32 KiB) Viewed 3859 times

Oh, I can't upload more than three attachments. The saved GPS image data showed N/A in every field.

(I had at one point 45 image files open and PWP 8 on the Task Manager showed 2.3 GB of RAM in use and 45% of my 16 GB RAM was in use totally, so I don't think it has to do with memory - I could never do this with PWP 6 or 7 as it would usually crash with that many images open.

Yesterday doing basically the same thing (41 images) worked fine. In the future I will check each saved image externally before I proceed with the next one. I'm not sure what I can do to trigger this problem and am open to suggestions. Thanks.

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 7:24 am
by jsachs
Were the images saved using File Save As or with the Export transformation?

I assume you double-checked that the JPEG file save options had Metadata set to All in File Preferences. Or if you have it set to Ask that Metadata was set to All when you saved the files.

The subset of the metadata PWP displays is obtained directly from the original file when it is read in. The metadata saved on File Save As is copied from the original file by ExifTool and is unrelated to the metadata PWP displays, so it is not surprising that PWP shows the GPS data but the file does not. Whether of not GPS data is saved should be totally dependent on the JPEG File Save Metadata setting being set to All.

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 8:04 am
by BobP45
Sorry, I mentioned it in the original post but didn't think to repeat it here. JPEG file save options are set to save All Metadata, don't ask, include script and show summary are not selected, quality 95%.

I am always using File Save As (the button on the tool bar).

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 8:31 am
by jsachs
For the next release, I updated to the latest ExifTool 11.52 and found some redundant code that was writing out TIFF and JPEG metadata twice which may have been causing problems.

If it has to do with the files having ICC profiles or not, that would suggest a different place to look for the problem.

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 10:38 am
by BobP45
I did some more investigating with the problem today that I mentioned above. It turns out the first 5 File Saves of the 31 contained all the metadata including GPS coordinates. It was after I overwrote the 5th file with another image (where I got the File Save As warning that the file existed and I chose Overwrite) that the metadata and GPS was lost. And it continued to not save the metadata and GPS for the remaining 26 files of the session.

I recovered the overwritten 5th image file from Dropbox and it had the GPS coordinates in the file. So at the moment it looks like overwriting an already saved image may destroy the metadata and it continues to not write the metadata on File Save As until I exit and restart PWP 8.

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 11:15 am
by jsachs
Looking at the code, I don't see how overwriting the old version should make a difference, but just to make sure I now explicitly delete the old file before writing the new one. I tested overwriting a JPEG with GPS metadata and it seemed to work OK. Hopefully this fixes the problem.

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 11:29 am
by Winfried
I did some tests and found something strange:
Exiftool tell me that the image is containing gps-data
------
GPS Altitude Ref : Above Sea Level
GPS Img Direction : 90.48
GPS Img Direction Ref : True North
GPS Latitude : 53 deg 57' 31.97" N
GPS Longitude : 14 deg 9' 59.78" E
GPS Map Datum : WGS-84
GPS Processing Method : GPS
GPS Satellites : 11
GPS Speed : 0.07
GPS Speed Ref : km/h
GPS Status : Measurement Active
GPS Track : 322.99
GPS Track Ref : True North

----
Opening the file in PWP Beta 10-Jun-2019
the gps-tab shows n/a

After saving the file with save back, a test with exiftool shows the data again. So the copy of the Metadata from the source seemes to work.

Another possible hint. I run another application in parallel (IMatch), that makes use of Exittool. Maybe the different Exiftool-processes interfere somehow?

Re: JPEG Metadata lost intermittently with 5 Jun 2019 beta

Posted: June 21st, 2019, 12:41 pm
by jsachs
Please check this again after I issue the next release -- hopefully it will be fixed.