Mohamed Ali Chebbi
cb7a48f84a
Rework Asf and Riff formats ; add test/data for video support
2 years ago
Rosen Penev
805a1e5601
move inline to declaration
...
Fixes warning under Windows:
redeclared inline; 'dllimport' attribute ignored [-Wignored-attributes]
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević
c9f7a9f34e
Merge pull request #2479 from Exiv2/export_qtvid
...
Export QuickTimeVideo
2 years ago
Rosen Penev
db0da461ee
static_cast
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević
4e8dca45a3
Export QuickTimeVideo
2 years ago
Rosen Penev
a87c59be51
remove unused variable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi
bbb3f5afa8
add test/data for video support : gix issue in riff video and reference data test
2 years ago
Mohamed Ali Chebbi
82ea6bef52
add test/data for video support : make asfvideo more readable and fix some issues
2 years ago
Rosen Penev
3e97850e97
manual default member init
...
clang-tidy suggests this but fails to apply it.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse
346e11493f
Merge pull request #2443 from kevinbackhouse/inih-from-library3
...
Remove libinih from codebase and add it as a dependency instead
2 years ago
Rosen Penev
b31b4abbaf
fix __cplusplus check for MSVC
...
Because of an MSVC bug, __cplusplus is always 199711L. Use _MSVC_LANG
which gets set properly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
f515799a53
use some if constexpr
...
MSVC suggests this.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
bb311ba728
clang-tidy on Windows
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
d458bf2540
clang-tidy: apply to newly merged stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
e87de698f3
static_cast make_unsigned
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
85a2b8c63b
use some future C++ stuff when possible
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi
7fac35e19a
1748 Video Support in V1.0: part 3/3 : support Asfvideo ( #2416 )
...
* 1748 Video Support in V1.0: part 3/3 : support AsfVideo
* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : fix Mac Os error compile
* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : delete unuseful warnings
* code review and clean up some code
3 years ago
Rosen Penev
ff0491a102
clang-tidy: use make_unique
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
ce8920a0ea
clang-tidy: various fixes
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Mohamed Ali Chebbi
d755fc18b5
1748 Video Support in V1.0: part 2/3 : support Riffvideo ( #2415 )
...
* 1748 Video Support in V1.0: part 2/3 : support RiffVideo
* limit the buffer_size
* Update exiv2.md
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* Code Review and cleanUp code
* Update riffvideo.hpp
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
3 years ago
Mohamed Ali Chebbi
1280f3b849
1748 Video Support in V1.0: part 1/3 : support MatroskaViedo ( #2413 )
...
* 1748 Video Support in V1.0: part 1/3 : support MatroskaViedo
* Simplify the code of matroskavideo
* protect conevrtuint64 method from overflow
* use size_t instead of uint64_t
3 years ago
Kevin Backhouse
a4164ce866
Remove libinih from codebase and add it as a dependency instead.
3 years ago
Kevin Backhouse
292082df6f
Add break to loop to fix issue 2423, plus some other cleanups.
3 years ago
Peter
1f364be1fa
Fix seg fault when using `iconv_open()` ( #2403 )
...
* Fix seg fault when using `iconv_open()`
- Fix failure condition for `iconv_open()`
- Add new exception when failing to change the text encoding of an
Exif comment
* Add testing for `iconv_open()` seg fault bug
* Fix Python test by changing log level
3 years ago
Miloš Komarčević
9a6ee59421
Support brotli compressed boxes in JPEG XL
3 years ago
Peter
a2cb06a28e
Fix/add exceptions for BMFF based files ( #2364 )
...
* Fix BmffImage::writeMetadata() error id/message
* Add exceptions setting Exif/IPTC/XMP in BMFF
* Add missing header for new functions
3 years ago
Peter
ccebe7936e
Update Nikon flash tags ( #2274 )
3 years ago
Christoph Hasse
e4adf388aa
fix(quicktimevideo) cleanup and hardening as suggested in review by @kevinbackhouse
3 years ago
Christoph Hasse
0577057548
fix(quicktimevideo) silence windows warnings
3 years ago
Christoph Hasse
3456f30988
fix(video) clang-format quicktimevideo
3 years ago
Christoph Hasse
0a948c6a7d
feat(video) revive quicktime.{h,cpp} and adapt to codebase changes.
3 years ago
Rosen Penev
71dc04ebb1
misc sonarlint stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
10a62b2350
replace custom gcd function with std
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
fc840405cc
revert std::function back to function pointers
...
The former has too much overhead. No point in it.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
5c90684441
simplify some defines
...
As far as I can tell, _WIN32 is defined for true Windows platforms.
Cygwin is a POSIX platform.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
f3b572d211
fix iconv handling and windows
...
WIN32 as a define is wrong. _WIN32 is the correct one.
Which opens up the issue of the used functions and the wrong logic.
Changed the function logic to use if and elif, as done later in the
code.
Also changed all usages of WIN32 with _WIN32
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
938964f4d0
remove GroupName struct
...
No point in this.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
cc604780be
Merge pull request #2283 from kevinbackhouse/printStructure-depth
...
Convert type of depth parameter to size_t
3 years ago
Kevin Backhouse
4410f46214
Change the return type of the 2Data functions to size_t.
3 years ago
Rosen Penev
1d0530f04d
misc sonarlint changes
...
Mostly const changes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
b0040e3bbe
Convert type of depth parameter to size_t.
3 years ago
Kevin Backhouse
1958e70a71
Use int32_t in TimeValue
3 years ago
Rosen Penev
02b0ff39d7
Make headers compatible with C++11
...
Remove is_signed_v and CTAD for std::array as they are in C++17
Remove remove_cv_t, remove_pointer_t, and make_unsigned_t as they are in
C++14
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
9ca7f861cf
remove string_view from headers
...
This should allow usage with C++11 projects. It's also wrong. The only
user of this assigns an std::string from a string_view, which is not
safe.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Peter
dc4ae73013
Add tag description option to exiv2 app ( #2279 )
...
* Add `tagDesc()` to (Exif|Xmp|Iptc) Datums and Keys
* Add `--Print d` option to exiv2 app
* Add testing for all exiv2 application `--Print` options
* Update manpage
3 years ago
Kevin Backhouse
05586628b2
Merge pull request #2276 from kevinbackhouse/TagInfo-enums
...
Move enums from tags_int.hpp to tags.hpp
3 years ago
Kevin Backhouse
3ef783e02a
Convert IfdId and SectionId to enum classes.
3 years ago
Kevin Backhouse
3f7cb78a3b
Move enums from tags_int.hpp to tags.hpp
3 years ago
Rosen Penev
7575300732
clang: remove pointless ; at the end of function
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
e2ee1338f5
pass bool by value
...
No sense in passing by reference
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
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