Project

General

Profile

Editing Metadata » History » Version 5

Martina Trognitz, 2020-02-13 13:36

1 5 Martina Trognitz
h1. Editing File Metadata
2 1 Martina Trognitz
3
Many file formats support storing metadata in a dedicated header section. This can be enriched or altered.
4
5
Tools:
6
* ExifTool: https://exiftool.org {{collapse(How To)
7 2 Martina Trognitz
h3. Change value of a tag
8
9
* List of tags exiftool supports: https://exiftool.org/TagNames/index.html
10
11
For example change the value of the EXIF tag 'Artist'. With Windows cmd line.
12
13
# open cmd line (press Windows+R, type cmd and press enter)
14
# in cmd line navigate to folder containing exiftool executable
15
# to find the name of the tag you want to change, firs list metadata with actual tag names (use -s flag)
16
<pre>exiftool -s ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif</pre>
17 3 Martina Trognitz
This gives
18 2 Martina Trognitz
<pre><code class="shell">
19
ExifToolVersion                 : 11.86
20
FileName                        : 042_OeNB_1904-1a.tif
21
Directory                       : ../../../Documents/tmpStuff/bieber_PC_OeNB
22
FileSize                        : 10 MB
23
FileModifyDate                  : 2019:07:18 13:33:42+02:00
24
FileAccessDate                  : 2020:02:13 10:41:31+01:00
25
FileCreateDate                  : 2020:02:13 10:41:31+01:00
26
FilePermissions                 : rw-rw-rw-
27
FileType                        : TIFF
28
FileTypeExtension               : tif
29
MIMEType                        : image/tiff
30
ExifByteOrder                   : Little-endian (Intel, II)
31
SubfileType                     : Full-resolution image
32
ImageWidth                      : 2263
33
ImageHeight                     : 1515
34
BitsPerSample                   : 8 8 8
35
Compression                     : Uncompressed
36
PhotometricInterpretation       : RGB
37
Model                           : Microbox GmbH - Book2Net
38
StripOffsets                    : 272596
39
SamplesPerPixel                 : 3
40
RowsPerStrip                    : 4294967295
41
StripByteCounts                 : 10285335
42
XResolution                     : 400
43
YResolution                     : 400
44
ResolutionUnit                  : inches
45
Software                        : High Performance Image Library, (c) Michael Girke 2008
46
ModifyDate                      : 2016:08:29 15:44:31
47
Artist                          : Ísterreichische Nationalbilbiothek, Wien
48
ProfileCMMType                  : Apple Computer Inc.
49
ProfileVersion                  : 2.4.0
50
ProfileClass                    : Input Device Profile
51
ColorSpaceData                  : RGB
52
ProfileConnectionSpace          : Lab
53
ProfileDateTime                 : 2010:05:28 10:51:13
54
ProfileFileSignature            : acsp
55
PrimaryPlatform                 : Microsoft Corporation
56
CMMFlags                        : Not Embedded, Independent
57
DeviceManufacturer              :
58
DeviceModel                     :
59
DeviceAttributes                : Reflective, Glossy, Positive, Color
60
RenderingIntent                 : Perceptual
61
ConnectionSpaceIlluminant       : 0.9642 1 0.82491
62
ProfileCreator                  : Unknown (LOGO)
63
ProfileID                       : 0
64
ProfileCopyright                : Copyright by LOGO GmbH, Steinfurt
65
ChromaticAdaptation             : 1 0 0 0 1 0 0 0 1
66
RedMatrixColumn                 : 0.38354 0.14978 0
67
GreenMatrixColumn               : 0.57959 0.83546 0.01984
68
BlueMatrixColumn                : 0.00107 0.01474 0.80507
69
MediaWhitePoint                 : 0.9642 1 0.82491
70
MediaBlackPoint                 : 0 0 0
71
RedTRC                          : (Binary data 1034 bytes, use -b option to extract)
72
GreenTRC                        : (Binary data 1034 bytes, use -b option to extract)
73
BlueTRC                         : (Binary data 1034 bytes, use -b option to extract)
74
AToB0                           : (Binary data 221806 bytes, use -b option to extract)
75
AToB2                           : (Binary data 221806 bytes, use -b option to extract)
76
AToB1                           : (Binary data 221806 bytes, use -b option to extract)
77
ProfileDescription              : 1910044_28-05-2010_1
78
ImageSize                       : 2263x1515
79
Megapixels                      : 3.4
80 1 Martina Trognitz
</code></pre>
81 3 Martina Trognitz
# To change value of 'Artist' type: (see https://exiftool.org/#writing for details)
82
<pre>exiftool -Artist="Oesterreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif</pre>
83
# Now check the result
84
<pre>exiftool -s ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif</pre>
85
This gives 
86
<pre><code class="shell">
87
...
88
Artist                          : Oesterreichische Nationalbibliothek, Wien
89
...
90
</code></pre>
91
# Done!
92
93
* For applying this on all files in one folder:
94
<pre>exiftool -Artist="Oesterreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB</pre>
95
96
* For applying this on all files in one folder with subfolders:
97
<pre>exiftool -r -Artist="Oesterreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB</pre>
98 2 Martina Trognitz
99 4 Martina Trognitz
h4. Note
100
101
UTF-8 does not seem to work properly (although it might only be the case for EXIF tags).
102
* Workflow for testing can be found here: https://exiftool.org/forum/index.php?topic=5011.0
103
* In Windows cmd
104
** change codepage to utf-8
105
<pre>chcp 65001</pre>
106
** then execute steps as above but with -charset utf8
107
<pre>exiftool -charset utf8 -Artist="Österreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif</pre>
108 1 Martina Trognitz
}}