61 Commits (7576a2757b25e64bf53d4e21409f550064958236)

Author SHA1 Message Date
Luis Diaz 7576a2757b More size_t for sizes 3 years ago
Luis Diaz 62aad98d0b Change Metadatum::copy return value from long to size_t 3 years ago
Luis Díaz Más c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
Include what you use + more SPDX identifiers + few other cleanups
3 years ago
Rosen Penev 8dadcdf72a manual nullptr removals
unique_ptr has a bool overload. It's also easier to reason about.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más 8b1fe379a1 Removing unused headers thanks to IWYU 3 years ago
Luis Díaz Más 3f3b651c04 Remove unused stuff 3 years ago
Rosen Penev 5833101b9b manual nullptr conversions
Mostly not caught because I'm not running clang-tidy on Windows.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev a5c094b85f clang-tidy: use concat namespaces
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más b17828b454
Use SPDX for licenses (#2122)
* 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
3 years ago
Luis Díaz Más b9f9d041ea Several transformations on DataBuf + migration to size_t
- 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
3 years ago
Robin Mills 9bf4967e5c
Merge pull request #2110 from mallman/nikon_ContrastDetectAFInFocus
Make Nikon ContrastDetectAFInFocus tags Bytes that print as "Yes" or "No"
3 years ago
Michael Allman 5ff7d89a4c Document origin of data size specifications for Nikon maker note tag 0xb7 3 years ago
Michael Allman 54eab964a6 When selecting which version of nikonAf2 metadata to parse, include the
size of the data declared in the tag header as part of the lookup
3 years ago
Michael Allman a3e2410b88 Print value of ContrastDetectAFInFocus as Yes/No. Change internal
selection logic for NikonAf2* from tag data length to group version
3 years ago
Luis Díaz Más 8b3da36f42 Improvements from code review 3 years ago
Luis Díaz Más 7e5ba7cb23 Remove many redundant or not needed header inclusions 3 years ago
Luis Díaz Más b543f3e973 Use filesystem in getExiv2ConfigPath
It seems to have an important impact in performance. The execution of
ctest on Windows passed from 48.5 secs to 43.8. Check if this is the
same on Linux
3 years ago
Luis Díaz Más 476a5e23f9 Replace raw loop for any_of 3 years ago
Luis Díaz Más 405f4b5f1b Remove Util::dirname and finally the util files 3 years ago
Luis Díaz Más 49fbfb44a3 Remove startsWith from utils 3 years ago
Kevin Backhouse 2a3dd2def9
Replace Value::toLong with Value::toInt64. (#2062)
* Replace Value::toLong with Value::toInt64.

* Fix compiler warning.

* Fix compile error.

* Fix declaration of canonEv

* Fix compiler warning.

* Fix compiler warning.

* Use int64_t for offsets in tiffcomposite_int.cpp

* Fix compiler warning.

* Fix compiler warnings.

* Fix compiler warning.

* Fix compiler warning.

* Fix compiler warning.

* Fix compiler warning.

* Remove static_cast<long int> in TagDetails initializer.
3 years ago
Peter 1ae9f42cd8
Add camera models for NikonFl3 makernotes group (#1994)
* Add camera models for NikonFl3

* Python test for new NikonFl3 camera models
4 years ago
postscript-dev eb134d1946
Add testing for NikonFl7 makernotes group 4 years ago
Miloš Komarčević 2074f82344 Fold into common 02xx versions 4 years ago
Miloš Komarčević 4205e03c43 Extending Nikon3.ColorBalance version coverage 4 years ago
postscript-dev 7ace96263e
Add SonyMisc(2b|3c) Groups in TIFF files
- Previous version only supported JPEGs.
- Update Python test to use more specific grep, as this prevents
  SonyMisc(2b|3c) from being included. Regression test to be added
  in a different commit.
4 years ago
Kevin Backhouse 9ff72e5ca5
Make offset=0 the default parameter. 4 years ago
Kevin Backhouse c9d0cf3643
Make fields of DataBuf private. 4 years ago
Christoph Hasse 7d2f2d2526 make the ifdef in getExiv2ConfigPath a bit more minimal 4 years ago
Christoph Hasse 95c2c26747 Fixes for Max and Win 4 years ago
Christoph Hasse 6d5407e851 first search cwd for config file then check home dir 4 years ago
postscript-dev cc9d780534
Add SonyMisc3c makernote tags (tag 9400)
Changes:
+ Add tags. Rename Exiftool `SequenceLength` tags to `SequenceLength1`
  and `SequenceLength2`, to prevent a name clash.
+ Update docs and manpage.

Source: [Exiftool](https://exiftool.org)
4 years ago
postscript-dev 293fd586ab
Add SonyMisc2b makernote tags (tag 9404)
Changes:
+ Add tags, pretty printing and tag group selector function
+ Update docs

Source: https://exiftool.org/TagNames/Sony.html
4 years ago
postscript-dev b82084995c
Add `getExifValue()` to `makernote_int.cpp`
Function generalizes `getExifModel()`, allowing any value in a tag to
be accessed.
4 years ago
postscript-dev 510a38e27d
Move all `startsWith()` funcs to `Util` namespace
The function checks if a string is in the beginning of another. This
is intended for use until the move to C++20 when
`std::basic_string<>::starts_with()` becomes available. Suggested in
https://github.com/Exiv2/exiv2/pull/1777 .

Separate identical definitions have been moved into a single copy.
4 years ago
postscript-dev 0827a76b6a
Update Sony2Fp makernote functions
Minor changes using suggestions in #1777:
+ Simplify loop conditions
+ Add startsWith() in SonyMakerNote class
+ Change `if`/`else` to `switch`
4 years ago
postscript-dev 4a21b45e60
Update Sony2Fp makernote tag selector function
In C++20, std::string has a starts_with() function. Add a startsWith()
function now, which can be replaced when the project moves to C++20.

Suggested in https://github.com/Exiv2/exiv2/pull/1777
4 years ago
postscript-dev 4ac8ac9ba0
Update Sony2Fp makernote tags (tag 9402)
Changes:
+ Add pretty printing for all tags
+ Add camera selector, to prevent incompatible models using tags
+ Update testing with new values

Source: Exiftool (https://exiftool.org/TagNames/Sony.html)
4 years ago
Rosen Penev 2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev d1e116a8ef remove some pointless std::set
Partially found by gcc's -fanalyzer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev c44c289d76 clang-tidy: fix ending namespace comnments
Found with llvm-namespace-comment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 6da49fd29b more constexpr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev cdbee3c26c clang-tidy: init in member initializer
Found with cppcoreguidelines-prefer-member-initializer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev fdf9d3799c clang-tidy: don't use else after return
Found with llvm-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 1b9b77c51f clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev fddb035106 clang-tidy: remove pointless const
Found with readability-avoid-const-params-in-decls

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 2e73aa9dc0 default con/destructors in headers
Helps to optimize trivially destructable stuff.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8337462032 clang-tidy: use empty() instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 1dc1186760 clang-tidy: simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago