3500 Commits (aa86646f2717173f66369d86c6bc7bbbf4e8ceb8)

Author SHA1 Message Date
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
Kevin Backhouse 6798be637f
Merge pull request #1774 from Exiv2/mergify/bp/main/pr-1745
fix: avoid processing MOV (quicktime) files when BMFF is enabled (backport #1745)
4 years ago
Kevin Backhouse 7b3dd26c23
Merge pull request #1718 from opengisch/ios
Fix building for ios
4 years ago
postscript-dev eb22591cea
Fix formatting of sonyMisc1 makernote tags 4 years ago
Christoph Hasse 3e681c6730 fix: avoid processing MOV (quicktime) files when BMFF is enabled
(cherry picked from commit 1b6895927f293855e5bb437ad28f31da2c2cfe54)
4 years ago
Kevin Backhouse bf786f4cc6
Updates to make fuzzing work. 4 years ago
postscript-dev 2b8856dcea
Add SonyMisc1 (Tag 0x9403) makernote tags
Source: Exiftool (https://exiftool.org/TagNames/Sony.html)
4 years ago
Kevin Backhouse 033175e127
Don't deref end iterator. 4 years ago
Andrea Giudiceandrea 43fe7bbb98
Add Exif.Image.PageName tag (#1765)
* Add Exif.Image.PageName tag

* Add trailing punctuation mark to PageName and DocumentName tags description.

* Add XPosition and YPosition TIFF tags
4 years ago
Kevin Backhouse ff00771425 Better bounds checking in Jp2Image::printStructure
(cherry picked from commit 0fcdde80997913dde284ea98f06f9305d06cb160)
4 years ago
Kevin Backhouse c2b52119d4 Check that findKey didn't return end(). 4 years ago
Kevin Backhouse 98fb218475 Throw exception if lens info wasn't found. 4 years ago
Kevin Backhouse d30c95d07e fix incorrect loop condition (#1752) 4 years ago
Kevin Backhouse 5ab3f2b0c5 Defensive coding to avoid 0x80000000/0xFFFFFFFF FPE. 4 years ago
Kevin Backhouse 11a26fb0d4 Prevent divide-by-zero crash. 4 years ago
Kevin Backhouse 8c4d67ca50 Defensive coding to avoid 0x80000000/0xFFFFFFFF FPE. 4 years ago
norbertwg d5b7f99fbf Three tag descriptions corrected 4 years ago
Rosen Penev 37fea97dd3 clang-tidy: use override
Found with modernize-use-override

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

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 9210fb85f9 clang-tidy: pass by value
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse b16cd52b88 Replace sprintf with snprintf. 4 years ago
Rosen Penev 2fbf2e6b7c clang-tidy: remove dedundant initializer
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse a4c5bdac19 fix: stricter date parsing in value.cpp (#1720)
* Regression test for issue 1713

* Stricter date parsing.

* Fix test failure caused by stdout mismatch.

(cherry picked from commit ab58026cff0e5edebc026261e9dc4b7db05b802d)
4 years ago
mergify[bot] 1d64f482ff
fix: use vector::at() rather than operator[] (backport #1735) (#1741)
* 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>
4 years ago
Kevin Backhouse 2b84f4bd64
fix: zero initialize local variables. (#1743)
* Zero initialize local variables.

* Initialize xmpID_
4 years ago
Kevin Backhouse 3e099da7b7 Remove obsolete snprintf macros. 4 years ago
Christoph Hasse 2539e5dd7e fix: change duplicated Canon RF 100-500 2x into missing 1.4 teleconverter version 4 years ago
Christoph Hasse 704ee571de fix: allow for FX.Y syntax in aperture regex 4 years ago
Daniel Vogelbacher fa78ab3593 Use official Canon RF lens model names
The new RF line is named F2.8L instead of f/2.8L (for example).

This patch makes the model names identically to the official
Canon lens names and the same names exiftool uses.
4 years ago
Christoph Hasse 2f83b7e0f6
Merge pull request #1692 from Exiv2/hassec_canon_lens_test
New Canon Lens Identification + Automatic Test of all Lenses
4 years ago
andyrtr cfeceee416
add lens: Olympus M.ZUIKO DIGITAL ED 12-45mm F4.0 PRO (#1725)
* add lens ID for Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro #1723

* add test for #1723 checking the Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro recognized correctly
4 years ago
Matthias Kuhn 5aafb351e5 Fix building on ios 4 years ago
nulllinie 23dbf4f51a
correct identification for Tamron SP 24-70mm G2 A032 (#1691)
* correct identification for Tamron SP 24-70mm G2 A032 with LensType 0E (14)

Existing entry with LensType 4E is kept as it's needed as well
Added testcase for LensType 0E for Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2
4 years ago
Christoph Hasse efb0af8506 fix: make casts explicit to please msvc 4 years ago
Christoph Hasse 7867343611 fix: prefer symbolic boolean operators so windows is happy 4 years ago
Christoph Hasse bdd8a386b5 feat: improve lens recognition of canon makernote
If multiple choices are possible they are now all reported. This
behaviour is now the same as it is in exiftool.

All lenses are tested in the new test_canon_lenses.py test
4 years ago
Christoph Hasse 907fe2369e fix: readd some previously removed lenses now that we plan to trea ambiguous lenses 4 years ago
Christoph Hasse 4ee8962d42 refactor!: use lensfun style nameing for lenses 4 years ago
Alexander Steffen 56f9979a4b Improve detection of Canon lenses with TC
Lenses with and without a TC may share the same lens ID. Prefer entries
that explicitly mention the TC.
4 years ago
Alexander Steffen 9962b88db3 Fix misdetection of Tamron SP AF 300mm as Canon EF 75-300mm
When searching for the Tamron lens, only the string "300mm" is searched in
the lens description, which also happens to be present for the Canon lens.
Since the Canon lens comes first in the list, it wins. Fix this issue by
prefixing the search string with a single space so it always has to match
the full focal length specification.
4 years ago
Alexander Steffen 477150f067 Fix rounding error in fnumber calculation
The mathematical calculation of fnumbers does not always match the expected
values: For example for f/3.5 the precise mathematical value is 3.564...,
which gets rounded to 3.6. Fix this special case by returning a value
closer to the expected value.
4 years ago
Alexander Steffen 0d030eefdf Remove undetectable lenses
Lenses that have the exact same ID, focal length and aperture as some other
lens that comes earlier in the list (and thus always wins):
* 137, "Tamron SP 17-50mm f/2.8 XR Di II VC"
* 137, "Tamron SP 24-70mm f/2.8 Di VC USD"
* 161, "Sigma 28-70mm f/2.8 EX"
* 173, "Sigma 180mm EX HSM Macro f/3.5"
* 180, "Zeiss Milvus 50mm f/1.4"
* 183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"
* 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F004"
* 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F017"

Lenses that share their IDs with other lenses, but have no or an
unsupported focal length:
* 33, "Voigtlander or Carl Zeiss Lens"
* 131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"
4 years ago
Luis Díaz Más f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
4 years ago
Christoph Hasse 758dd6bbc6 refactor!: remove free() function from DataBuf to avoid potential problems, see #1542 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 86c71ae6c3 clang-tidy: avoid global non const variables
Found with cppcoreguidelines-avoid-non-const-global-variables

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 4c4f8da338 remove initializers
these were moved outside the constructor body.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev e5894d71e1 default con/destructors in headers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ce47de67b5 use auto in template
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 a74bceacb0 clang-tidy: remove pointless return
Found with readability-redundant-control-flow

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8dbc699858 clang-tidy: add missing explicit
Found with google-explicit-constructor

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

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 036af68a71 remove pointless constructors
Replaced with Uniform initialization. Allows constexpr usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8564d0b394 clang-tidy: pass by value
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev f9d394adf0 clang-tidy: run through performance checks
Found with performance*

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 20dfab8036 manual for range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8e52032ee0 clang-tidy: range loop conversions
Found with: modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev c73dfa0106 clang-tidy: use uppercase numeric literals
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8e178e912e replace {} initialization with fill
Old compilers don't implement {} correctly.

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 4aa5566cf6 clang-tidy: make several member functions const
Found with readability-make-member-function-const

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 24a8139233 clang-tidy: fix badly indented if
Found with readability-misleading-indentation

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 bf290e84e5 fix compilation with EXIV2_DEBUG_MESSAGES
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Miloš Komarčević 3416b631c5
Add Sony ARW compression to dict 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 80595f8468 clang-tidy: remove duplicate public
Found with readability-redundant-access-specifiers

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse ca66136092 Use readOrThrow to check error conditions of iIo.read().
(cherry picked from commit 0f9eb74c44c908e170a64cab590949d53749af8e)
4 years ago
Rosen Penev 5dc4292b40 fix bad for range loop
This loop is supposed to break when it encounters a match.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 091fd77885 clang-tidy: remove redundant member init
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 674fdcd38b clang-tidy: fix declartation names
Found with readability-inconsistent-declaration-parameter-name

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 428c436629 clang-tidy: simplify boolean expression
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 5d716c7df4 clang-tidy: empty() conversions
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 9642e3cceb clang-tidy: remove pointless string init
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 143a1fbbe2 clang-tidy: don't use string compare
Found with readability-string-compare

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 af7b2430c5 clang-tidy: use override
Found with modernize-use-override

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 15f0a600ed clang-tidy: use default member init
Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse 170b18db74
Merge pull request #1621 from Exiv2/mergify/bp/main/pr-1591
Fix infinite loop caused by subBox with zero size. (backport #1591)
4 years ago
Luis Díaz Más b4b8061478 Early access is always compiled 4 years ago
Kevin Backhouse 566ea272a1 Prevent large allocation.
(cherry picked from commit f154f0ae540deeb9251467187d01c2a5846d27b5)
4 years ago
Kevin Backhouse aac34630d4 Fix infinite loop caused by subBox with zero size.
(cherry picked from commit 2736126e7b92c5654f56620c097f9a4580c0f73b)
4 years ago
Luis Díaz Más 9dbffa719b Add missing public headers to install target 4 years ago
Rosen Penev 5a9c29303e clang-tidy: remove pointless static
Found with readability-static-definition-in-anonymous-namespace

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

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev b3040da54c clang-tidy: don't check for NULL with delete
Found with readability-delete-null-pointer

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
Rosen Penev 8128716287 clang-tidy: use = default
Found with modernize-use-equals-default

Ran through git clang-format

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse 57cad2619b Add bounds check in Jp2Image::doWriteMetadata().
(cherry picked from commit e6a0982f7cd9282052b6e3485a458d60629ffa0b)
4 years ago
Luis Díaz Más b675c58bab Move include/CMake to src 4 years ago
Luis Díaz Más 1b4577904b Fix MSVC build 4 years ago
tbeu bf0d8114c9 #525: Update comment and fix variable name 4 years ago
tbeu 94420ab591 Remove custom rwlock in favor of `std::mutex` of C++11
Current design on Windows was broken anyway, since legacy class `RWLock` does not implement a proper rwlock (shared read and exclusive write)

Once we are allowed using C++14 features, we can replace the `std::mutex` by `std::shared_timed_mutex` and the read-access locks by `std::shared_lock`.
Once we are allowed using C++17 features, we can replace the `std::mutex` by `std::shared_mutex` and the read-acces locks by `std::shared_lock`.
4 years ago