Will the GPS tags not be transfered from one file to another?

Started by FreddyFremad, April 14, 2021, 05:21:24 PM

Previous topic - Next topic

FreddyFremad

Hi,

I am trying to copy all relevant tags from an updated .CR2 original to a .jpg version using this command:
R:\exiftool.exe -m -q -q -overwrite_original_in_place -fast -x ExifImageWidth -x ExifImageHeight -tagsFromFile "P:\long path-IMG_7367.CR2" "P:\another long path-IMG_7367.JPG"

I have checked that an exiftool listing of all tags contains GPS in the - EXIF - section:
GPS information:
GPSVersionID - 2.0.0.0
GPSLatitudeRef - S
GPSLatitude - 27  53  44.3339 (27.895648)
GPSLongitudeRef - E
GPSLongitude - 153  24  1.6649 (153.400462)
(Yeah, I used to live in Australia ;-))

That is not transferred to the jpg.
For some odd reason I have (some years ago when I was using exifutils) discovered that jpg-files derived from .cr2 can get destroyed by setting exif-info. Hence I have made this work-around in my program - not that I understand it :-)
I have kept this odd solution even though it may no longer be nescessary.
Previously I also deleted all tags from the jpg before copying from the CR2. I skipped that step - would that be a problem?

CR2 and thumbnail .jpg (extracted from .cr2) does not have this issue.
.CR3 also updates nicely - it seems. It is rather new for me :-)


BTW.
I noticed a post complaining about the speed on windows 10 - and a possible "dispute" with the windows security.
I also find it somewhat slow. My R: is a RAM-drive and I have excluded entire drive from windows security.
I also use R: as a temp-drive for the tag-listings to be read by my program (have 32GB RAM in the computer :-))

Current version is 12.21 - have seen 12.24 just now and will upgrade as soon as my currently runnig job allows it.

StarGeek

Are you sure that the GPS coordinates are embedded in the CR2 and not in a xmp sidecar file by checking the CR2 file directly with exiftool?  There are almost no programs that will directly edit a CR2 so unless you added the GPS data directly to the CR2 file with exiftool or similar program, the GPS coordinates won't be in the CR2 but in the XMP sidecar. 

Check by running
exiftool -G1 -a -s -gps* file.cr2

Quote from: FreddyFremad on April 14, 2021, 05:21:24 PM
I am trying to copy all relevant tags from an updated .CR2 original to a .jpg version using this command:
R:\exiftool.exe -m -q -q -overwrite_original_in_place -fast -x ExifImageWidth -x ExifImageHeight -tagsFromFile "P:\long path-IMG_7367.CR2" "P:\another long path-IMG_7367.JPG"

This command should copy the GPS coordinates if they exist in the CR2, as well as any other tags except the two you excluded, though the location may change depending upon the tags (see second paragraph under the -TAG[+-^]=[VALUE] option) .  But you might try running it without the -m (-ignoreMinorErrors) option and -q (quiet) option to see if you're suppressing a minor error that is preventing data from being copied.

QuotePreviously I also deleted all tags from the jpg before copying from the CR2. I skipped that step - would that be a problem?

No, it shouldn't be a problem.  The command you list will overwrite any existing tags during the copy.

QuoteI noticed a post complaining about the speed on windows 10 - and a possible "dispute" with the windows security.
I also find it somewhat slow. My R: is a RAM-drive and I have excluded entire drive from windows security.
I also use R: as a temp-drive for the tag-listings to be read by my program (have 32GB RAM in the computer :-))

Running exiftool should be just about as fast as copying the files.  If, for example, you're running it on several hundred large jpegs, the type that would come out of the camera, then it can take some time depending upon the speed of the drive the files are on.  For example, when I ran a command to edit data on nearly 6,000 files, it took quite some time, as it was 71 gigs worth of files.

Your R: drive doesn't enter into the processing with your example command, since the files exiftool is reading and writing are on the P: drive.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

FreddyFremad

Thank You for the fine answer  :)

You are right in that there are basically no programs that will alter the CR2/CR3 files. You are also right in the assumption that I do it myself using exiftool :-)
I have made a copy/paste of part of a txt-file created by exiftoool:
exiftool.exe -EXIF:All -d "YYYY:mm:dd HH:MM:SS" %indfil% GT R:\exiftool-test.txt
(part of a small .bat file I use for these test-purposes).

Yes I realize the reading and writing of the files om P: (a NAS box on a GB ethernet LAN) is a large part of it. RAW-files are in the 30+Mb area.
When my program operates it is creating a temp txt-file on R: from a command like this:
R:\exiftool.exe " -a -u -g1 -fast -w! " path\%f_something" " "inputfile"
(I hope I have translated the quotations correctly :))

It takes like 1 second to create and read the temp-file with a lot of exif-info. This is somewhat slower than in the past but hey exiftool is able to make some sense out of CR3 (canons new RAW format) files. That is a very nice achievement.
Initially when I work on my files - and enter them in my own DB using exif info from exiftool the files are on Q:. Q: in a locally attached SSD drive. Transfer of new photos from my UHS-II flash reader to Q: is in the 250MB/s area.

So recent files are on SSD, exiftool and temp file are on a RAM drive.
... and after a couple of months photos are moved to NAS :)

:) Freddy