News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Writing to many files and which fields are best practice

Started by mrXif-geoTagger, November 02, 2022, 06:23:06 PM

Previous topic - Next topic

mrXif-geoTagger

Quote from: StarGeek on November 24, 2022, 06:48:43 PM...Get the data into the file!

Couldn't agree more. This is exactly what I'm doing in my application!

The last thing i wonder about, and I wonder if I'm missing arguments for codepage or something, OR if it in fact is limitations in the tags: When I write the special Norwegian chars to the various fields, only these four were able to retain these correctly:
IFD0: Artist: in12Ærtistø
IFD0: Copyright: in13Cøpyright ÆØÅ(C)æøå
File: Comment: in15Descriptioøn_ÆØÅ(C)æøå
IFD0: Image Description: in15Descriptioøn_ÆØÅ(C)æøå

See a screenshot of my inputs/command/output here: https://ibb.co/1b3d7S4
(will be automatically deleted in 6 months)

This is the command (you can probably not see the special Norwegian characters):
-DateTimeOriginal#=1900:01:01 00:00:00
-OffsetTimeOriginal=+01:00
-XMP:DateCreated="1900:01:01"
-MWG:Keywords+=in1ØÆÅ
-MWG:Keywords+=in2æøå
-MWG:Location=in3locÆØÅ
-MWG:City=in4cityæøå
-MWG:State=in5stateæøå
-MWG:Country=in6countryÆØÅ
-GPSLatitude*=33
-GPSLongitude*=44
-XPSubject=in7Åse, in8Kjærsti, in9Bjørg, in10ÆØÅæøå
-XMP:PersonInImage+=in7Åse
-XMP:PersonInImage+=in8Kjærsti
-XMP:PersonInImage+=in9Bjørg
-XMP:PersonInImage+=in10ÆØÅæøå
-XMP:Source=in11Ævisøå
-MWG:Creator=in12Ærtistø
-MWG:Copyright=in13Cøpyright ÆØÅ(C)æøå
-MWG:Description=in15Descriptioøn_ÆØÅ(C)æøå
-comment=in15Descriptioøn_ÆØÅ(C)æøå
-XPComment=in15Descriptioøn_ÆØÅ(C)æøå
-XMP:OriginalFilename=x1æøå.jpg
-XMP:Title=x1æøå.jpg
-IPTC:ObjectName=x1æøå.jpg
-MWG:CreateDate="2022:11:07 15:45:25"
-overwrite_original
C:\tmp\test\x1æøå.jpg
-execute1


The (sorted & selected) output is:
IPTC: Time Created: 00:00:00+01:00
IPTC: Digital Creation Time: 15:45:25+01:00
IPTC: Date Created: 1900:01:01
XMP-photoshop: Date Created: 1900:01:01
ExifIFD: Date/Time Original: 1900:01:01 00:00:00
IPTC: Digital Creation Date: 2022:11:07
ExifIFD: Create Date: 2022:11:07 15:45:25
XMP-xmp: Create Date: 2022:11:07 15:45:25
GPS: GPS Latitude: 33.000000
GPS: GPS Longitude: 44.000000
GPS: GPS Longitude Ref: East
IFD0: Software: HDZphotoNamer v1.0.0
IPTC: Keywords: in1, in2
XMP-dc: Subject: in1???, in2???
XMP-photoshop: Source: in11?vis??
IPTC: By-line: in12
XMP-dc: Creator: in12?rtist?
IFD0: Artist: in12Ærtistø
IPTC: Copyright Notice: in13C
XMP-dc: Rights: in13C?pyright ???(C)???
IFD0: Copyright: in13Cøpyright ÆØÅ(C)æøå
IPTC: Caption-Abstract: in15Descriptio
XMP-dc: Description: in15Descriptio?n_???(C)???
File: Comment: in15Descriptioøn_ÆØÅ(C)æøå
IFD0: Image Description: in15Descriptioøn_ÆØÅ(C)æøå
IPTC: Sub-location: in3loc
XMP-iptcCore: Location: in3loc???
XMP-iptcExt: Location Shown Sublocation: in3loc???
IPTC: City: in4city
XMP-iptcExt: Location Shown City: in4city???
XMP-photoshop: City: in4city???
IPTC: Province-State: in5state
XMP-iptcExt: Location Shown Province State: in5state???
XMP-photoshop: State: in5state???
IPTC: Country-Primary Location Name: in6country
XMP-iptcExt: Location Shown Country Name: in6country???
XMP-photoshop: Country: in6country???
XMP-iptcExt: Person In Image: in7?se, in8Kj?rsti, in9Bj?rg, in10??????
GPS: GPS Latitude Ref: North
IPTC: Object Name: x1
XMP-dc: Title: x1???.jpg
XMP-getty: Original File Name: x1???.jpg
System: File Name: x1æøå.jpg

Anything I should do differently to preserve the special characters?

(just noticed that I can attach images here :- )
HDZphotoNamer.jpg

Phil Harvey

If you are passing UTF-8 characters to ExifTool then you don't need to specify a -charset option, and the characters will be properly written to XMP.  If you are writing to IPTC, you should add -codedcharacterset=utf8 to the command, but only if the pre-existing IPTC doesn't already contain non-UTF8 characters.  See FAQ 10 for all the details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).