Rosen Penev
c74ae5aa00
clang-tidy: remove const char operator
...
It morphs into std::string anyway.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
5ca0acd129
clang-tidy: some llvm- warnings
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
f787a4c2ac
clang-tidy: add missing override
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
a5c521ea57
Merge pull request #2252 from neheb/2
...
clang-tidy: use default member init
3 years ago
Kevin Backhouse
b3f2ab5988
Fix some "signed shift" warnings.
3 years ago
Rosen Penev
bae7da19ca
clang-tidy: use default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
ad4e13b827
Change return type of BasicIo::tell() to size_t.
3 years ago
Rosen Penev
a98954a98e
clang-tidy: add missing special member functions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Viktor Schneider
1ff09506e0
add missing header for std::unique_ptr in values.hpp
...
76f01fd4d3
removes the <memory> header
which is required to use std::unique_ptr for some builds
(e.g. archlinux using gcc 12.1.0).
3 years ago
Rosen Penev
19dc566889
use _v
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
...
Improvements around TODO comments
3 years ago
Rosen Penev
a86bc386da
reference conversions
...
There's no nullptr here.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
a8061e7ee9
clang-tidy: default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
6964f5f9f2
DataBuf::c_data() returns nullptr when empty + avoid duplication
...
After the previous commit, I realized that std::vector::data() also
returns nullptr when the vector is empty. So I decided to emulate this
behavior in DataBuf::c_data().
Anyways, the changes done in the previous commit are valid and allow us
to avoid some processing when the DataBuf is empty.
3 years ago
Luis Díaz Más
25c47cd1cf
Merge pull request #2197 from Exiv2/mainRefactoringFormats
...
Refactoring in JpegImage and Photoshop classes
3 years ago
Luis Díaz Más
f942ba89bd
Move Photoshopb class to internal namespace
3 years ago
Luis Diaz
047f6b733e
Change logic to determine if segment has size
...
Note that the failing tests that had to be adapted were bad formed files
from FUZZERs. We should not consider invalid markers like 0x00 or 0x52
but only undefined APPn markers.
3 years ago
Luis Diaz
24d2a7b8f0
JpegBase::markerHasLength moved to implementation details
3 years ago
Luis Diaz
23fe743d4d
Move private constants to .cpp
3 years ago
Rosen Penev
b53ed72fd8
clang-tidy: manual special functions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
a20ace20fc
clang-tidy: manual clang-tidy fixes
...
clang-tidy has issues applying these.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
fdfcde5e4b
structured binding conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Diaz
8ab7800477
Remove 2nd param from Photoshop::isIrb() since it is always hardcoded
3 years ago
Luis Diaz
a698c3fc08
Remove deprecated variable
3 years ago
Luis Diaz
459c73c0f6
doxygen: update doc style in Photoshop class
3 years ago
Rosen Penev
06d977d7bc
clang-tidy: use default
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
fafe999c6e
remove unused var from deleted stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c0868aff31
std::function
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c4eedd6ae4
nodiscard addition
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
389501462a
delete
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
1fbe4b7bbd
use = delete and move to public
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c17e2a1a5a
add missing destructor
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
7a4541cf50
use empty()
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
02fe0181df
const variable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b75239c52d
const member function
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Christoph Hasse
08cef207ab
add .git-blame-ignore-revs file and add clang-format commit to it ( #2170 )
...
* add .git-blame-ignore-revs file and add clang-format commit to it
* formatting fix follow up from #2158
* update .git-blame-ignore-revs
3 years ago
Rosen Penev
bad4712df8
static constexpr conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
d7f35e33f0
Remove useless static_casts
3 years ago
Luis Díaz Más
ae4df71233
Remove DataBuf::copyBytes and use std::copy instead
3 years ago
Luis Díaz Más
734b909721
Help for formatting enums & arrays with clang-format
3 years ago
Kevin Backhouse
15328aaa9f
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45291
...
Use std::round() to handle fractions correctly.
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
4355d635d4
More conversions to size_t while removing static_casts
3 years ago
Luis Diaz
7576a2757b
More size_t for sizes
3 years ago
Luis Diaz
137ea080b5
Change Metadatum::size() return value from long to size_t
3 years ago
Luis Diaz
62aad98d0b
Change Metadatum::copy return value from long to size_t
3 years ago
Luis Díaz Más
7119b7676f
remove templating & simplify error message
...
+ clang-format in Error files
+ Remove AnyError
3 years ago
Luis Díaz Más
96f7f2e4c5
Convert Exiv2::ErrorCode into an enum class
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
Luis Díaz Más
85d6082d7f
Should fix build in some Linux distros
3 years ago
Rosen Penev
c2bcd4b08e
replace EXV_COUNTOF with std::size
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
f156af46f3
Fix build on Windows
3 years ago
Luis Díaz Más
5a6ec65315
Use SPDX identifiers in more files
3 years ago
Luis Díaz Más
b3a216310a
Removing unused headers thanks to IWYU
3 years ago
Luis Díaz Más
5508e6f466
hexdump to size_t
3 years ago
Luis Díaz Más
8b1fe379a1
Removing unused headers thanks to IWYU
3 years ago
Luis Díaz Más
ffb5cdf721
Merge pull request #2127 from neheb/21
...
use make_unsigned_t
3 years ago
Rosen Penev
09e0ea83f6
use make_unsigned_t
...
Simpler
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
def782fb65
replace several typedefs with using
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
a25bbe133f
constexpr string conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
ae3e28c62a
make array constexpr
...
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
Luis Díaz Más
7dea0050b1
Factor out duplicated piece of code
3 years ago
Luis Díaz Más
5d627433fc
Remove useless DataBuf::clear()
3 years ago
Luis Díaz Más
3a749e6861
No need to define copy & move ctors
3 years ago
Luis Díaz Más
2bacff0f5c
Simplify DataBuf
3 years ago
Luis Díaz Más
f1e04ee866
Replace DataBuf internal buffer with std::vector
3 years ago
Luis Díaz Más
aec36f86d7
Replace naked new operators
3 years ago
Luis Díaz Más
c5a9dfd9af
Merge pull request #2109 from Exiv2/main_StringView
...
Refactoring & cleanup
3 years ago
Luis Díaz Más
8b3da36f42
Improvements from code review
3 years ago
Kevin Backhouse
a7ce4ee846
Move Metadatum::toUint32() implementation out of header file.
3 years ago
Kevin Backhouse
90aa007188
Convert type of pixelHeight/pixelWidth to platform-independent uint32_t.
3 years ago
Luis Díaz Más
f774a3b25e
Fix build on linux
3 years ago
Luis Díaz Más
9fb43f28e0
Use standard [[maybe_unused]]
3 years ago
Luis Díaz Más
76f01fd4d3
Clean more header inclusions
3 years ago
Luis Díaz Más
f060b58fd4
Clean config.h from old stuff
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
a6185d29c6
Image::setComment now takes string_view
3 years ago
Luis Díaz Más
8b2d17312e
ReplaceStringInPlace does it in-place now
3 years ago
Luis Díaz Más
45300ad667
BasicIo::path() returns const ref
3 years ago
Luis Díaz Más
0726104b1a
Hide pathOfFileUrl in the only place where it is used
3 years ago
Luis Díaz Más
6f762b4e66
Use std::filesystem for fileExist
3 years ago
Luis Díaz Más
f1ff3aaa4c
Make urldecode in-place
3 years ago
Luis Díaz Más
3d370cc2ae
Improvements in urlencode
3 years ago
Kevin Backhouse
256365830a
Replace Metadatum::toLong() with Metadatum::toInt64().
3 years ago
Luis Díaz Más
408d80bce8
Change order of ImageType values
3 years ago
Luis Díaz Más
690dde3440
Add tests for ImageFactory::checkMode (for all the supported image types)
3 years ago
Luis Díaz Más
f10283f118
bug: Fix crash when calling ImageFactory::create(none)
3 years ago
Luis Díaz Más
5a9799ffb2
Replace ImageType namespace by a enum class
3 years ago
Luis Díaz Más
7933ff401d
Remove dead code around EXV_UNICODE_PATH
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
1f07715141
Revert "Delete dead code"
...
This reverts commit 1d6bac61f2
.
3 years ago
Luis Díaz Más
d8732a716e
Remove dead code
3 years ago
Luis Díaz Más
9d8dd86945
Use auto to reduce verbosity around code dealing with iterators
3 years ago
Luis Díaz Más
a42501864a
Recover some documentation strings
3 years ago
Luis Díaz Más
c531c4abf5
More tests for IptcDataSets
3 years ago
Luis Díaz Más
476a254dfc
Remove dead code
...
No way to obtain nullptr DataSet* when we are checking already the 2
only existing DataSets above.
3 years ago
Luis Díaz Más
15e8c75a38
Delete unused IptcKey copy operator
3 years ago
Luis Díaz Más
df0b7c450d
Hide public details
3 years ago
Luis Díaz Más
1d6bac61f2
Delete dead code
3 years ago
Luis Díaz Más
071e73fa4d
Add many tests for datasets
3 years ago
Luis Díaz Más
a94d648d05
Rest of tests to have 100% coverage in BMP class
3 years ago
Luis Diaz
edf39e00dd
Add new BMP tests
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
Luis Díaz Más
b0318c36be
Upgrade C++ standard to c++17 ( #2052 )
...
* Enable C++17 and use new inline specifier for const variable members
* Silence deprecation warning on MSVC
* Disable samples by default
* improvements after review
3 years ago
Luis Díaz Más
813566526c
Revisiting cmake code for generating coverage reports ( #2047 )
...
* cmake: better usage of gcovr for coverage reports
* Add test for FileIo::setPath
* Remove useless seek() overload
* Add missing override specifiers
* ignore .vs folder
* Small refactors in BasicIo implementations
* Remove duplicated doxygen doc
* Refactor & add tests for MemIO
* Fix compilation warnings on windows
4 years ago
Kevin Backhouse
29f7d0ccf0
Remove DataBuf::release() which is no longer used.
4 years ago
Robin Mills
13a2cf336d
fix_1416_iptc_DateCreated ( #1547 )
...
* fix_1416_iptc_DateCreated
* Fix unit tests
* DateValue:read 2nd iteration on pre-condition
* test with ISO_8601 date format
* Use std::regex for ISO 8601 basic & extended date formats
* Use std::regex for ISO 8601 basic & extended time formats
* Add more tests & notes for DateValue & TimeValue
* Comment tests using local calendar times
* DateValue::write also adds padding to year field
Co-authored-by: Luis Díaz Más <piponazo@gmail.com>
4 years ago
Kevin Backhouse
44542a9f94
Add readOrThrow and seekOrThrow to BasicIo.
4 years ago
Miloš Komarčević
8b7d8729b7
Expose unsupported CR3 previews as binary
4 years ago
Miloš Komarčević
40e5021577
Limit CR3 previews to JPEG only
4 years ago
David Houlder
b385f2db1c
Canon cr3 previews ( #1958 )
...
* Extract THMB and PRVW images from Canon CR3 file
* Added test for Canon CR3 preview extraction.
Added test data Canon-R6-pruned.CR3 (first 492016 bytes of https://raw.pixls.us/getfile.php/4659/nice/Canon%20-%20Canon%20EOS%20R6%20-%203:2.CR3 ).
See https://github.com/Exiv2/exiv2/issues/1893
* Fixed format specifier
* Update src/bmffimage.cpp
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
* Update src/bmffimage.cpp
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
* retrigger checks
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
4 years ago
postscript-dev
c07bbfca3e
Fix doc description of Image::iccProfileDefined()
4 years ago
Kevin Backhouse
94ea0c6d90
Delete the copy assignment operator to avoid accidental copying.
4 years ago
Kevin Backhouse
81cfc162c1
Use std::move to transfer ownership of DataBufs.
4 years ago
Jim Easterbrook
a6480f972c
Hide "static constexpr auto" from SWIG
...
SWIG can't parse "static constexpr auto" at present. As there's no need
to SWIG private class members simply hiding the expression is all that's
needed.
4 years ago
Kevin Backhouse
9b79b378b1
Remove unused constructor that was causing a build failure in OSS-Fuzz.
...
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38491
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
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
4674fae4ef
Safer casting from double to long.
...
(cherry picked from commit 372e28c41044a9e8b65d7d7093e028e30a7c8c8a)
4 years ago
Kevin Backhouse
2532f6db40
Add `markerHasLength` utility function.
4 years ago
Christoph Hasse
7251a96da6
remove exv_grep_keys_t type alias
4 years ago
Christoph Hasse
d82980b563
refactor: replace old linux regex.h with regex from STL.
4 years ago
Kevin Backhouse
02d4ef2c5e
Support for 64-bit box lengths looked broken.
4 years ago
Kevin Backhouse
8c64e9abba
Add `pbox_end` param to `BmffImage::boxHandler` to enforce box nesting.
4 years ago
Kevin Backhouse
5ab3f2b0c5
Defensive coding to avoid 0x80000000/0xFFFFFFFF FPE.
4 years ago
Rosen Penev
3b2a1b9d84
clang-tidy: use braced init list
...
Found with modernize-return-braced-init-list
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
52a9ed30cf
clang-tidy: use nullptr
...
Found with modernize-use-nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
7732b9308e
clang-tidy: add explicit
...
Found with hicpp-explicit-conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
97cf02bf12
clang-tidy: remove redundant specifiers
...
Found with readability-redundant-access-specifiers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
430ff1c9b8
clang-tidy: replace throw with noexcept
...
Found with modernize-use-noexcept
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
Rosen Penev
4a654e4266
clang-tidy: do not use 0 for bool
...
Found with modernize-use-bool-literals
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
99823a526c
clang-tidy: replace virtual with override
...
Found with modernize-use-override
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
19000cd53c
con/destructor fixes
...
Added = delete to make it explicit. Also made them public.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
7a2b05e813
clang-tidy: use = default
...
Found with modernize-use-equals-default
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
e53548a95a
clang-tidy: use default member init
...
Found with modernize-use-default-member-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
17a8d743a5
clang-tidy: do not use else after return
...
Found with llvm-else-after-return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
e9309f25ab
clang-tidy: simplify bools
...
Found with readability-simplify-boolean-expr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
c20394b3fa
remove old MSVC hacks
...
This is C++11 now.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
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
e5894d71e1
default con/destructors in headers
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago