37 Commits (026cee3e6a6e5916b63f7c16dc74c773dc8839f8)

Author SHA1 Message Date
Rosen Penev 28d1880176 replace find/rfind with startsWith
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Peter 9767e375af
Update makernote model ID tags (#2389)
* Update `Exif.Sony(1|2).SonyModelID` values

* Update `Exif.Pentax.ModelID` values

* Update `Exif.Canon.ModelID` values

* Purge duplicates in `Exif.Canon.ModelID`

* Correct text in `Exif.Canon.ModelID`
3 years ago
Kevin Backhouse 3897f17b1e Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52355
Avoid integer overflow when temp == INT_MIN.
3 years ago
Peter 9dc34ad39c
Update Sony(1|2) tags (#2323)
* Update Sony(1|2) group (minor Minolta changes)

Transcribe all tags (except for `LensID`) from main ExifTool Sony
group into Exiv2.
Changes include:
- Rename `ColorReproduction` -> `CreativeStyle` and
  `LongExposureNoiseReduction` -> `FocusMode3` to reflect use.
- Rename `0x*` tagnames to equivalent ExifTool tags (e.g.,
  `0x2006` -> `Sharpness`).
- Remove tag entries that are Groups (e.g., `ShotInfo`).
- Separate some common Sony/Minolta data as the camera types use
  different values (e.g., `Quality`)
- Additional `exiv2-Sony*.exv` test files come from ExifTool Sony
  samples (https://exiftool.org/Sony.tar.gz).

ExifTool Sony tags sources:
https://www.exiftool.org/TagNames/Sony.html
1e17485cbb/lib/Image/ExifTool/Sony.pm

* Improve coverage of `Sony(1|2)` group

* Fix clang compilation on macOS

* Fix github-code-scanning warnings

* Fix minor `Exif.Sony(1|2)` problems

* Fix tests and update `Sony(1|2)` group coverage

* Fix testing

* Minor fixes and regenerate Regression data

* Update Sony tags with `getModel()`

Make finding the Sony model more resilient by also using
`SonyModelID`.

* Fix `Exif.Sony(1|2).AFPointsUsed` type

* Improve `Exif.Sony(1|2).*` coverage

* Fix types in Sony func `getFocusMode()`

* Update Regression tests for `Sony(1|2)`

* Minor fixes to `Sony(1|2)` tags

* Update `Sony(1|2)` tag coverage

* Improve `Sony(1|2)` tag coverage

* Update easyaccess with `Exif.Sony(1|2)` tags

* Update `SonyModelID` array comment

* Add Sony `LensSpec` tag to easyaccess

* Update `Sony(1|2)` label/descriptions

* Update `int` to `size_t` (credit:@kevinbackhouse)

* Fix Windows build warning in `src/tags_int.hpp`
3 years ago
Rosen Penev 1d0530f04d misc sonarlint changes
Mostly const changes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 932d59a984 find_if conversion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse 3ef783e02a
Convert IfdId and SectionId to enum classes. 3 years ago
Rosen Penev 48f848f5bb clang-tidy: remove const params in decls
Found with readability-avoid-const-params-in-decls

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev c997b09a81 algorithm conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más 30bf563f4d Update .clang-format file & apply clang-format to whole project 3 years ago
Rosen Penev b2b6d834ba
some std::array conversions (#2148)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Diaz 62aad98d0b Change Metadatum::copy return value from long to size_t 3 years ago
Luis Díaz Más 8b1fe379a1 Removing unused headers thanks to IWYU 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
Kevin Backhouse 5d86044c71
Merge pull request #2107 from kevinbackhouse/MetadataToLong
Replace Metadatum::toLong() with Metadatum::toInt64().
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 256365830a
Replace Metadatum::toLong() with Metadatum::toInt64(). 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
postscript-dev 54ee165261
Add conditions to 2 Sony temperature tags
Only certain camera models are supported.

Source: https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/Sony.pm
4 years ago
Kevin Backhouse c9d0cf3643
Make fields of DataBuf private. 4 years ago
postscript-dev 0144209ed0 Add SonySInfo1 makernote tags (tag 3000)
Add all tags, except the face detection sub-groups and related
bookkeeping values.

Source: Exiftool (https://exiftool.org/TagNames/Sony.html)
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 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 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
postscript-dev eb22591cea
Fix formatting of sonyMisc1 makernote tags 4 years ago
postscript-dev 2b8856dcea
Add SonyMisc1 (Tag 0x9403) makernote tags
Source: Exiftool (https://exiftool.org/TagNames/Sony.html)
4 years ago
Rosen Penev 6da49fd29b more constexpr
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
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
clanmills 18ed65a25f fix_Sony2010e_0.27 Thanks to @sridharb1 5 years ago
Robin Mills ab375fb074 Add support for FocusPosition in Sony RAW files (#906)
* Fix 582 Add support for FocusPosition in Sony RAW files
* Thanks to @boardhead sonyFpCrypt() works correctly. Removed debug code. Fixed typos.
* Update doc/templates/Makefile to process Sony2Fp
* Following review by @boardhead. Renamed sonyFpCrypt() as sonyTagDecipher().
* Fixed writing the tag thanks to @boardhead explaining encipher/decipher.
  Sadly, ArrayCfg/crpyt does not know if he's encrypting/decrypting.
  I've added a sniff in TiffEncoder::visitBinaryArrayEnd to avoid changing the API.
* Added URL to discussion concerning sonyTagCipher()
* make sonyTagCipher() a static function with no external visibility.
6 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Luis Díaz Más d3748152a7 add _int suffix to all the internal files 8 years ago