Luis Díaz Más
c5a9dfd9af
Merge pull request #2109 from Exiv2/main_StringView
...
Refactoring & cleanup
3 years ago
Kevin Backhouse
5db9a25b19
Fix compiler warnings.
3 years ago
Luis Díaz Más
ea201ce613
Remove dead code
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
Luis Díaz Más
0f03e77634
Simplify code around UniquePtr(s) & use make_unique over new
3 years ago
Luis Díaz Más
9d8dd86945
Use auto to reduce verbosity around code dealing with iterators
3 years ago
Josh Soref
e56abfa10a
Spelling ( #2067 )
...
* spelling: accelerometer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: address
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: anonymous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: available
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: baby
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: buffer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: build
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: builds
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: by inclusion
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: byte order
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: camera
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: command
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: consistency
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: constructor
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: continuous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: continuously
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: correspond
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: decompression
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dedicated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: denominator
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dependencies
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: detector
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dlighting
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dragging
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: duplicate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dynamic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: empty
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: enable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: endianness
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: examining
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: exceed
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: extension
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: fact
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: fails
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: fixed
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: fluorescent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: focuspoint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: focuspoints
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: from
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: happened
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: hierarchy
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: initiate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: interesting
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: internal
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: javascript
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: language
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: libiconv
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: libraries
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: library
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: localization
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: macros
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: member
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: members
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: metadata
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: miscellaneous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: mnemonic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: modified
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: multiple
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: multithreaded
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: mysterious
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: photoshop
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: platforms
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: preliminary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: priority
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: properties
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: qualifier
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: recognition
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: recognized
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: reentrancy
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: remaining
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: remotetest
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: requested
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: sensitivity
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: standardize
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: successful
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: such
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: tags
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: temperature
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: test
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: the
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: these
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: third
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: this
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: transparent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: underwater
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: uninterpreted
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: using
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: utc - coordinated universal time
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: which
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: with
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
3 years ago
Kevin Backhouse
b6a4fd1c67
Add storage parameter to setData.
4 years ago
Kevin Backhouse
9f3240c91c
Delete TiffEntryBase::isMalloced_ field and use a std::shared_ptr instead.
4 years ago
Kevin Backhouse
e34eacc467
Use memmove, rather than memcpy, because memory regions might overlap.
4 years ago
Kevin Backhouse
a1ad29edf3
Treat Exif.Sony1.PreviewImage as undefined tag.
4 years ago
Kevin Backhouse
81cfc162c1
Use std::move to transfer ownership of DataBufs.
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
Kevin Backhouse
cb16324bcf
Merge pull request #1882 from kevinbackhouse/FixIssue1881
...
Throw an error if the size of the preview is greater than 1MB
4 years ago
Kevin Backhouse
60144df557
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37492
...
Throw an error if the size of the preview is greater than 1MB.
4 years ago
Rosen Penev
f3fcffd6e6
remove most usages of std::make_pair
...
Better alternatives exist with C++11.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse
64fe77673f
Decouple EXIV2_BUILD_FUZZ_TESTS from EXIV2_TEAM_USE_SANITIZERS.
4 years ago
Kevin Backhouse
944e68fa15
Merge pull request #1787 from Exiv2/mergify/bp/main/pr-1766
...
Extra checking to prevent loop counter from wrapping around (backport #1766 )
4 years ago
Kevin Backhouse
69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions.
4 years ago
Kevin Backhouse
dc2c77ce81
Safer std::vector indexing.
4 years ago
Kevin Backhouse
bf786f4cc6
Updates to make fuzzing work.
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
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
743da1a564
clang-tidy: use C++ casting
...
Found with google-readability-casting
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
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
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
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
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
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
Rosen Penev
4ceb325c8f
clang-tidy: range for loop conversions
...
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>
4 years ago
Luis Díaz Más
f85f7f717a
Replace many of the iterators types with auto
4 years ago
Luis Díaz Más
0a1bf46a1c
revert changes that are affecting to VS
4 years ago
Luis Díaz Más
de4d43d4d1
Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
...
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
4 years ago
Robin Mills
3682bce15e
Fix Ubuntu 20.04/Release/Sanitizer test breaker
4 years ago
Luis Díaz Más
0bbaa6eff3
cpp: Replace auto_ptr by unique_ptr
4 years ago
Robin Mills
d632988bbd
Massive code prolog cleanup.
4 years ago
Robin Mills
e032586d74
Code/comment tidy.
5 years ago
Robin Mills
a8b549f7df
Remove debugging code.
5 years ago
Robin Mills
45119e3260
WIP: working to understand how to support tiffIfd in tiffvisitor_int.cpp
5 years ago
Robin Mills
05538ebea2
fix1001_rename_AFPrimaryPoint
6 years ago
clanmills
90f9f0bc19
Add support for Exif.Canon.AF tags to be read from images
...
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.
6 years ago
Luis Díaz Más
113136e134
Replace DEBUG with EXIV2_DEBUG_MESSAGES
...
Fixes #926
6 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