* Use SPDX identifier in header files
* Use SPDX identifier in rest of source files
* Fix usage of SPDX for files with 2 licenses
* Add global license file
* Fix compilation
- Provide begin/end iterators to DataBuf and simplify code
- Adapt test output after last changes
- Replacing long by size_t in value.hpp
- Use size_t in some Photoshop functions
- Remove some static_casts
* fix: use vector::at() rather than operator[] (#1735)
* Regression test for https://github.com/Exiv2/exiv2/issues/1706
* Use vector::at() rather than operator[].
* Print to stderr when exception is caught and EXIV2_DEBUG_MESSAGES is enabled.
* Check that it prints "Bad value" for the date.
(cherry picked from commit f4d3adbf91e6dc4e34aee5bac7b7fd9e127a5c00)
# Conflicts:
# src/value.cpp
* fix merge conflicts from mergify backport
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
Found with modernize-loop-convert
Ran through git clang-format.
Also removed several questionable loops and replaced with simpler
algorithms.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This PR (and fix981_canonAutoFocus2) use a decoder listed in TiffMappingInfo to
decode Exif.Canon.AFInfo. The decoding function "manufactures" Exif tags such as
Exif.Canon.AFNumPoints from the data in Exif.Canon.AFInfo. These tags must never
be written to file and are removed from the metadata in
exif.cpp/ExifParser::encode().
Three of the tags created (AFPointsInFocus,AFPointsSelected, AFPrimaryPoint) are
bitmasks. As the camera can have up to 64 focus points, the tags are a 64 bit
mask to say which points are active. The function printBitmask() reports data
such as 1,2,3 or (none).
This decoding function decodeCanonAFInfo() added to TiffMappingInfo manufactures
the new tags. Normally, tags are processed by the binary tag decoder and that
approach was taken in branch fix981_canonAf. However, the binary tag decoder
cannot deal with AFInfo because the size of some metadata arrays cannot be
determined at compile time.