From 862e6198f5ac329ea63249fbfeec0a34938ca5f0 Mon Sep 17 00:00:00 2001 From: postscript-dev Date: Sat, 18 Sep 2021 16:33:07 +0100 Subject: [PATCH 1/9] Fix markdown manpage formatting GitHub flavored markdown uses `- ` for a bullet point, instead of a `+ `. --- man/man1/exiv2.md | 64 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/man/man1/exiv2.md b/man/man1/exiv2.md index 50aa46f0..3bc12a3a 100644 --- a/man/man1/exiv2.md +++ b/man/man1/exiv2.md @@ -99,21 +99,21 @@ TIFF | Read/Write | Read/Write | Read/Write | - | Read/Write | Rea WEBP | Read/Write | - | Read/Write | - | Read/Write | Read/Write XMP | - |- | Read/Write | - | - | - -+ Support for GIF, TGA and BMP images is minimal: the image format is +- Support for GIF, TGA and BMP images is minimal: the image format is recognized, a MIME type assigned to it and the height and width of the image are determined. -+ Reading other TIFF-like RAW image formats, which are not listed in +- Reading other TIFF-like RAW image formats, which are not listed in the table, may also work. -+ Some image formats allow an extra interal type of metadata. Only +- Some image formats allow an extra interal type of metadata. Only partial support exists for the RAF format. -+ Support for BMFF types such as AVIF, CR3, HEIF and HEIC is a build +- Support for BMFF types such as AVIF, CR3, HEIF and HEIC is a build option. To check if this is enabled, use `exiv2 --version --verbose --grep bmff` and see if `enable_bmff=1`. -+ Naked codestream JXL files do not contain Exif, IPTC or XMP metadata. +- Naked codestream JXL files do not contain Exif, IPTC or XMP metadata. [TOC](#TOC) @@ -819,11 +819,11 @@ or downloaded from https://www.exiv2.org/download.html. For the Exif, IPTC and XMP groups: -+ The same tags that are available in Exif's Image group (e.g., Exif.Image.XResolution), +- The same tags that are available in Exif's Image group (e.g., Exif.Image.XResolution), are also available in Exif's Thumbnail, Image(2|3), SubImage(1-9) and SubThumb1 groups, (e.g., Exif.Thumbnail.XResolution). -+ Many camera manufacturer's tags are available and are accessed as +- Many camera manufacturer's tags are available and are accessed as different Exif groups, using the manufacturer's name as a prefix (e.g., CanonCs is the Camera Settings for a Canon camera). Groups called the manufacturer name plus number, access the main tags in different file @@ -834,13 +834,13 @@ tags for all the different manufacturers is an ongoing task, only partial support is available. The full unprocessed makernotes data is available in [Exif.Photo.MakerNote](https://www.exiv2.org/tags.html). -+ Every Exif and IPTC tag has a tag number (16 bit, 2 byte integer), +- Every Exif and IPTC tag has a tag number (16 bit, 2 byte integer), which is unique within a Group (to display, see [--Print x](#Print_flgs)). -+ Some of the Exif and IPTC tags are mirrored in the XMP specification +- Some of the Exif and IPTC tags are mirrored in the XMP specification (see https://www.exiv2.org/metadata.html). -+ The XMP specification is flexible and allows new custom 'Groups' and +- The XMP specification is flexible and allows new custom 'Groups' and 'Tagnames' to be added (see [Adding new XMP tags](#add_xmp_tags) and ['Modify' command format](#mod_cmd_format)). For example, the 'cm2e' 'Group' has been added, which has 'Father' and 'Family' Tagnames. @@ -856,7 +856,7 @@ Xmp.dc.description LangAlt 1 lang="x-default" Cla Xmp.dc.Family XmpBag 1 Robin ``` -+ Further information on Exiv2 groups can be found on the Exiv2 wiki: https://github.com/Exiv2/exiv2/wiki +- Further information on Exiv2 groups can be found on the Exiv2 wiki: https://github.com/Exiv2/exiv2/wiki [TOC](#TOC) @@ -1687,99 +1687,99 @@ Exif.NikonLd3.LensFStops Byte 1 F4.6 # 13 EXAMPLES -+ `exiv2 *.jpg`
+- `exiv2 *.jpg`
Prints a summary of the Exif information for all the JPEG files in the current directory (the same as `exiv2 print *.jpg`). The summary is brief and does not use the Family.Group.Tagname format. See ([--print mod](#print_mod)). -+ `exiv2 --grep date/i https://clanmills.com/Stonehenge.jpg`
+- `exiv2 --grep date/i https://clanmills.com/Stonehenge.jpg`
Prints the tags in https://clanmills.com/Stonehenge.jpg, where the key (see [Exiv2 key syntax](#exiv2_key_syntax)) contains the string *date* (*/i* searches case insensitive, see [--grep str](#grep_str)). When not including [--print mod](#print_mod) or [--Print flgs](#Print_flgs), the default output becomes [--print a](#print_mod) (i.e., print all). -+ `exiv2 --print i image.jpg`
+- `exiv2 --print i image.jpg`
Prints the IPTC tags in *image.jpg* (see [--print mod](#print_mod)). -+ `exiv2 --Print IkytEX image.jpg`
+- `exiv2 --Print IkytEX image.jpg`
Prints (with finer grained control) the Exif and XMP tags in *image.jpg*. The tag's key (see [Exiv2 key syntax](#exiv2_key_syntax)), type and translated value are displayed (see [--Print flgs](#Print_flgs)). -+ `exiv2 rename image.jpg`
+- `exiv2 rename image.jpg`
Renames *image.jpg* (taken on 13-Nov-05 at 22:58:31) to *20051113_225831.jpg*. See [rename](#mv_rename). -+ `exiv2 --rename ":basename:_%Y-%m" image.jpg`
+- `exiv2 --rename ":basename:_%Y-%m" image.jpg`
Renames *image.jpg* using the basename (i.e., *image*) and values defined in [iconv_open(3)](https://linux.die.net/man/3/iconv_open) to *image_2005-11.jpg*. The values for time and date are taken from the Exif tags. See [--rename fmt](#rename_fmt)). -+ `exiv2 --extract t image1.jpg image2.jpg`
+- `exiv2 --extract t image1.jpg image2.jpg`
Extracts (copies) the thumbnail from *image1.jpg* into *image1-thumb.jpg* and from *image2.jpg* into *image2-thumb.jpg*. See [--extract tgt3](#extract_tgt3). -+ `exiv2 --insert t image1.jpg image2.jpg`
+- `exiv2 --insert t image1.jpg image2.jpg`
Inserts (copies) thumbnails *image1-thumb.jpg* into *image1.jpg* and *image2-thumb.jpg* into *image2.jpg*. See [--insert tgt2](#insert_tgt2). -+ `exiv2 --extract p1,2 image.jpg`
+- `exiv2 --extract p1,2 image.jpg`
Extracts (copies) previews 1 and 2 from *image.jpg*, into *image-preview1.jpg* and *image-preview2.jpg*. Use `exiv2 --print p image.jpg` to display a list of available previews for *image.jpg*. See [--extract tgt3](#extract_tgt3). -+ `exiv2 --extract X image.jpg`
+- `exiv2 --extract X image.jpg`
Extracts (copies) metadata tags from *image.jpg*, into an XMP sidecar file, *image.xmp*. In the process, this converts selected Exif and IPTC tags to XMP tags. See [--extract tgt3](#extract_tgt3). -+ `exiv2 --insert X image.jpg`
+- `exiv2 --insert X image.jpg`
Inserts (copies) metadata from an XMP sidecar file, *image.xmp*, into *image.jpg*. The resulting Exif and IPTC tags are converted from the equivalent XMP tags in the sidecar file. See [--insert tgt2](#insert_tgt2). -+ `exiv2 --extract X --Modify "add Xmp.dc.subject Sunset" image.jpg`
+- `exiv2 --extract X --Modify "add Xmp.dc.subject Sunset" image.jpg`
Extracts (copies) metadata tags from *image.jpg*, applies [--Modify cmd](#Modify_cmd) to those tags and then saves in an XMP sidecar file, *image.xmp*. While saving, selected Exif and IPTC tags are converted to XMP tags. Multiple [--Modify cmd](#Modify_cmd) and [--modify cmdfile](#modify_cmdfile) can be used. See [--extract tgt3](#extract_tgt3). -+ `exiv2 --extract X- image1.jpg | exiv2 --insert X- image2.jpg`
+- `exiv2 --extract X- image1.jpg | exiv2 --insert X- image2.jpg`
Extracts (copies) the *image1.jpg* metadata as XMP sidecar data and inserts it directly into *image2.jpg*. [--Modify cmd](#Modify_cmd) and [--modify cmdfile](#modify_cmdfile) can also be added when extracting from *image1.jpg*. See [--extract tgt3](#extract_tgt3) and [--insert tgt2](#insert_tgt2). -+ `exiv2 delete image.jpg`
+- `exiv2 delete image.jpg`
Deletes all the metadata in *image.jpg*. See [delete](#rm_delete). -+ `exiv2 --delete tC image.jpg`
+- `exiv2 --delete tC image.jpg`
Deletes the thumbnail and ICC profile in *image.jpg*. See [--delete a](#delete_tgt1). -+ `exiv2 --adjust 1:00:00 image.jpg`
+- `exiv2 --adjust 1:00:00 image.jpg`
Adjusts Exif timestamps in *image.jpg*, adding 1 hour. See [--adjust time](#adjust_time). -+ `exiv2 --Modify "set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg`
+- `exiv2 --Modify "set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg`
Sets the Exif comment in *image.jpg*, to an Ascii string with the value *New Exif comment*. See [--Modify cmd](#Modify_cmd). -+ `exiv2 --Modify "set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" --Modify "set Exif.GPSInfo.GPSLatitudeRef N" image.jpg`
+- `exiv2 --Modify "set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" --Modify "set Exif.GPSInfo.GPSLatitudeRef N" image.jpg`
Sets the latitude to 4 degrees, 15 minutes and 33 seconds north in *image.jpg*. The Exif standard stipulates that the GPSLatitude tag consists of three Rational numbers for the degrees, minutes and seconds of the latitude and GPSLatitudeRef contains either 'N' or 'S' for north or south latitude respectively. See [--Modify cmd](#Modify_cmd). -+ `exiv2 --Modify "reg myPrefix http://ns.myPrefix.me/" --Modify "add Xmp.myPrefix.Whom Mr. Mills" Stonehenge.jpg`
+- `exiv2 --Modify "reg myPrefix http://ns.myPrefix.me/" --Modify "add Xmp.myPrefix.Whom Mr. Mills" Stonehenge.jpg`
Registers a new XMP namespace called *http://ns.myPrefix.me/* and a new XMP group called *myPrefix*. This new Group has a new *Whom* tag added to it. See [--Modify cmd](#Modify_cmd). -+ `exiv2 --location /tmp --suffix .CRW insert /data/*.JPG`
+- `exiv2 --location /tmp --suffix .CRW insert /data/*.JPG`
Copy all metadata from *CRW* files in the */tmp* directory to *JPG* files with corresponding basenames in the */data* directory. Note that this copies metadata as is, without any modifications to adapt it to the @@ -1787,7 +1787,7 @@ requirements of the target format. Some tags copied like this may not make sense in the target image. See [--location dir](#location_dir) and [--suffix suf](#suffix_suf) and [insert](#in_insert). -+ `exiv2 fixiso image.jpg`
+- `exiv2 fixiso image.jpg`
Adds the Exif ISO metadata (if missing) to *image.jpg*. This is for Nikon and Canon cameras only and copies the camera maker's value into the Exif tags. See [fixiso](#fi_fixiso). From 9cbbd12aec066895a5effbd1328ff28ce967dc9d Mon Sep 17 00:00:00 2001 From: postscript-dev Date: Tue, 21 Sep 2021 14:52:08 +0100 Subject: [PATCH 2/9] Move exiv2.md - easier to find --- man/man1/exiv2.md => exiv2.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename man/man1/exiv2.md => exiv2.md (100%) diff --git a/man/man1/exiv2.md b/exiv2.md similarity index 100% rename from man/man1/exiv2.md rename to exiv2.md From cb1b632263bad5fdd5bba864b2183ce4424e551e Mon Sep 17 00:00:00 2001 From: postscript-dev Date: Tue, 21 Sep 2021 14:55:18 +0100 Subject: [PATCH 3/9] Update markdown files with changes to manpage --- README-SAMPLES.md | 19 ++++++++++++------- README.md | 22 ++++++++++------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/README-SAMPLES.md b/README-SAMPLES.md index 28a5e6f1..3430720b 100644 --- a/README-SAMPLES.md +++ b/README-SAMPLES.md @@ -23,7 +23,7 @@ The following programs are build and installed in /usr/local/bin. | _**exifdata**_ | Prints _**Exif**_ metadata in different formats in an image | [exifdata](#exifdata) | [exifdata.cpp](samples/exifdata.cpp) | | _**exifprint**_ | Print _**Exif**_ metadata in images
Miscelleous other features | [exifprint](#exifprint)| [exifprint.cpp](samples/exifprint.cpp) | | _**exifvalue**_ | Prints the value of a single _**Exif**_ tag in a file | [exifvalue](#exifvalue) | [exifvalue.cpp](samples/exifvalue.cpp) | -| _**exiv2**_ | Command line utility to read, write, delete and modify Exif, IPTC, XMP and ICC image metadata.
This is the primary test tool used by Team Exiv2 and can exercise almost all code in the library. Due to the extensive capability of this utility, the APIs used are usually less obvious for casual code inspection. | [https://exiv2.org/manpage.html](https://exiv2.org/manpage.html)
[https://exiv2.org/sample.html](https://exiv2.org/sample.html) | | +| _**exiv2**_ | Utility to read and write image metadata, including Exif, IPTC, XMP, image comments, ICC Profile, thumbnails, image previews and many vendor makernote tags.
This is the primary test tool used by Team Exiv2 and can exercise almost all code in the library. Due to the extensive capability of this utility, the APIs used are usually less obvious for casual code inspection. | [exiv2 manpage](exiv2.md)
[https://exiv2.org/sample.html](https://exiv2.org/sample.html) | | | _**exiv2json**_ | Extracts data from image in JSON format.
This program also contains a parser to recursively parse Xmp metadata into vectors and objects. | [exiv2json](#exiv2json) | [exiv2json.cpp](samples/exiv2json.cpp) | | _**geotag**_ | Reads GPX data and updates images with GPS Tags | [geotag](#geotag) | [geotag.cpp](samples/geotag.cpp) | | _**iptceasy**_ | Demonstrates read, set or modify IPTC metadata | [iptceasy](#iptceasy) | [iptceasy.cpp](samples/iptceasy.cpp) | @@ -162,16 +162,20 @@ Option: all | exif | iptc | xmp | filesystem This program dumps metadata from an image in JSON format. _Code: [exiv2json.cpp](samples/exiv2json.cpp)_ -exiv2json has a recursive parser to encode XMP into Vectors and Objects. XMP data is XMP and can contain XMP `Bag` and `Seq` which are converted to JSON Objects and Arrays. Exiv2 presents data in the format: Family.Group.Tag. For XMP, results in "flat" output such such as: +exiv2json has a recursive parser to encode XMP into Vectors and Objects. XMP data is XMP and can contain XMP `Bag` and `Seq` which are converted to JSON Objects and Arrays. Exiv2 presents data in the format: [Family.Group.Tagname](exiv2.md#exiv2_key_syntax). For XMP, results in "flat" output such such as: ``` -$ exiv2 -px ~/Stonehenge.jpg +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --print x Stonehenge.jpg Xmp.xmp.Rating XmpText 1 0 Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 +Xmp.cm2e.Father XmpText 11 Robin Mills +Xmp.cm2e.Family XmpBag 0 Xmp.dc.description LangAlt 1 lang="x-default" Classic View +Xmp.dc.Family XmpBag 1 Robin ``` -exiv2json parses the Exiv2 'Family.Group.Tag' data and restores the structure of the original data in JSON. _Code: [exiv2json.cpp](samples/exiv2json.cpp)_ +exiv2json parses the Exiv2 [Family.Group.Tagname](exiv2.md#exiv2_key_syntax) data and restores the structure of the original data in JSON. _Code: [exiv2json.cpp](samples/exiv2json.cpp)_ ``` $ exiv2json -xmp http://clanmills.com/Stonehenge.jpg @@ -532,7 +536,8 @@ FlashDevice, 9, 0x0009, Nikon3, Exif.Nikon3.FlashDevice, Ascii, Flash de We can see those tags being used: ``` -$ exiv2 -pa --grep Nikon3 http://clanmills.com/Stonehenge.jpg +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --print a --grep Nikon3 Stonehenge.jpg Exif.Nikon3.Version Undefined 4 2.11 Exif.Nikon3.ISOSpeed Short 2 200 ... @@ -542,7 +547,7 @@ This information is formatted (search Nikon (format 3) MakerNote Tags): [https:/ #### taglist all -These options are provided to list every Exif tag known to Exiv2. The option `all` prints Group.Name for every tag. The option `ALL` print Group.Name followed by the TagInfo for that tag. For example: +These options are provided to list every tag known to Exiv2. The option `all` prints the [Group.Tagnames](exiv2.md#exiv2_key_syntax) for every Exif tag. The option `ALL` prints the [Group.Tagnames](exiv2.md#exiv2_key_syntax) for every Exif tag, followed by the TagInfo for that tag. For example: ```bash $ taglist all | grep ISOSpeed$ @@ -659,4 +664,4 @@ Read an XMP packet from a file, parse and re-serialize it. Robin Mills
robin@clanmills.com
-Revised: 2021-06-23 \ No newline at end of file +Revised: 2021-09-21 \ No newline at end of file diff --git a/README.md b/README.md index f3e9e73e..51282b5e 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,7 @@ See [README-CONAN](README-CONAN.md) for more information. ### Libiconv -The library libiconv is used to perform character set encoding in the tags Exif.Photo.UserComment, Exif.GPSInfo.GPSProcessingMethod and Exif.GPSInfo.GPSAreaInformation. This is documented in the exiv2 man page. +The library libiconv is used to perform character set encoding in the tags Exif.Photo.UserComment, Exif.GPSInfo.GPSProcessingMethod and Exif.GPSInfo.GPSAreaInformation. This is documented in the [exiv2 man page](exiv2.md). CMake will detect libiconv of all UNIX like systems including Linux, macOS, UNIX, Cygwin64 and MinGW/msys2. If you have installed libiconv on your machine, Exiv2 will link and use it. @@ -311,9 +311,9 @@ You must install the build to test localisation. This ensures that the localisa $ env LANG=fr_FR exiv2 # env LANGUAGE=fr_FR exiv2 on Linux! exiv2: Une action doit être spécifié exiv2: Au moins un fichier est nécessaire -Utilisation : exiv2 [ options ] [ action ] fichier ... +Utilisation : exiv2 [ option [ arg ] ]+ [ action ] fichier ... -Manipulation des métadonnées EXIF issues des images. +Image metadata manipulation tool. $ ``` @@ -334,14 +334,14 @@ I edited the following: ```bash #: src/exiv2.cpp:237 -msgid "Manipulate the Exif metadata of images.\n" +msgid "Image metadata manipulation tool.\n" msgstr "" ``` to: ```bash #: src/exiv2.cpp:237 -msgid "Manipulate the Exif metadata of images.\n" +msgid "Image metadata manipulation tool.\n" msgstr "Manipulate image metadata.\n" ``` @@ -362,7 +362,7 @@ $ sudo cp -R po/xy/LC_MESSAGES/exiv2.mo /usr/local/share/locale/xy/LC_MESSAGES $ env LANG=xy exiv2 # env LANGUAGE=xy on Linux! exiv2: An action must be specified exiv2: At least one file is required -Usage: exiv2 [ options ] [ action ] file ... +Usage: exiv2 [ option [ arg ] ]+ [ action ] file ... Manipulate image metadata. <--------- Edited message! $ @@ -717,14 +717,12 @@ You may wish to use wine to execute exiv2 from the command prompt. To do this: [rmills@rmillsmm-fedora build_mingw_fedora]$ wine cmd Microsoft Windows 6.1.7601 -Z:\Home\gnu\github\exiv2\0.27-maintenance\build_mingw_fedora>bin\exiv2 +Z:\Home\gnu\github\exiv2\main\build_mingw_fedora>bin\exiv2 exiv2: An action must be specified exiv2: At least one file is required -Usage: exiv2 [ options ] [ action ] file ... +Usage: exiv2 [ option [ arg ] ]+ [ action ] file ... -Manipulate the Exif metadata of images. - -Z:\Home\gnu\github\exiv2\0.27-maintenance\build_mingw_fedora> +Image metadata manipulation tool. ``` If you have not installed wine, Fedora will offer to install it for you. @@ -1333,5 +1331,5 @@ $ sudo pkg install developer/gcc-7 [TOC](#TOC) -Written by Robin Mills
robin@clanmills.com
Updated: 2021-04-06 +Written by Robin Mills
robin@clanmills.com
Updated: 2021-09-21 From 2004aeb8d86f5f8eb428aafa3d92bf303de9aab3 Mon Sep 17 00:00:00 2001 From: postscript-dev Date: Tue, 21 Sep 2021 16:35:29 +0100 Subject: [PATCH 4/9] Update manpage URLs --- man/man1/exiv2.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/man1/exiv2.1 b/man/man1/exiv2.1 index fdd2ca47..dea9ce3a 100644 --- a/man/man1/exiv2.1 +++ b/man/man1/exiv2.1 @@ -1,3 +1,6 @@ The Exiv2 manpage is available online. .sp 1 -See: https://www.exiv2.org/manpage.html \ No newline at end of file +.nf +Latest release: https://www.exiv2.org/manpage.html +Github 'main': https://github.com/Exiv2/exiv2/blob/main/exiv2.md +.fi \ No newline at end of file From 0da5603b11564df7afa41e092c0d693f2d91baab Mon Sep 17 00:00:00 2001 From: postscript-dev Date: Thu, 23 Sep 2021 17:34:54 +0100 Subject: [PATCH 5/9] Fix long code block lines in exiv2.md Fix will help when file is converted to PDF for the website. --- exiv2.md | 100 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 44 deletions(-) diff --git a/exiv2.md b/exiv2.md index 3bc12a3a..7cd8b052 100644 --- a/exiv2.md +++ b/exiv2.md @@ -571,25 +571,27 @@ as well as data columns included in the print output. Valid flags are: | s | Size in bytes of vanilla output (see note in [Exif 'Comment' values](#exif_comment_values)). Some types include a *NULL* character in the size (see [Exif/IPTC/XMP types](#exiv2_types)) | | v | Plain data value (vanilla values, i.e., untranslated) | | V | Plain data value and the word 'set ' (see ['MODIFY' COMMANDS](#modify_cmds))| -| t | Interpreted (translated) human-readable data values | +| t | Interpreted (translated) human-readable data values (includes plain vanilla values) | | h | Hex dump of the data |