norbertwg
74720d8044
Remove duplicate tag info entries fujifilm ( #2412 )
...
* remove duplicate Fuijifilm TagInfo entries
* test data added for some Fujifilm tags
* remove unknown tag 0x1200
* fix typo: SzeneRecognition to SceneRecognition
3 years ago
Peter
83d7915d00
Update `Exif.SonyMisc3c.*` and `Exif.Sony(1|2).SonyModelID` ( #2420 )
...
* Update `Exif.SonyMisc3c group`
* Update `Exif.Sony(1|2).SonyModelID`
3 years ago
Miloš Komarčević
5949ec9293
Add Canon R6m2 ID
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
Kevin Backhouse
ddd7ccf722
Use std::is_signed and std::enable_if.
3 years ago
Kevin Backhouse
335e13251e
Add #error so the build fails if mmap isn't supported.
3 years ago
Kevin Backhouse
5cabd97373
Fix issue 2380: bug in (unused) non-mmap code.
3 years ago
Kevin Backhouse
abd817d181
Use size_t for sizes and offsets.
3 years ago
Kevin Backhouse
c96bc47509
Change return type of getFileLength() to int64_t.
3 years ago
Kevin Backhouse
d599d36f8b
Merge pull request #2394 from kevinbackhouse/fix-issue-2393
...
stop looping when eof is hit
3 years ago
Rosen Penev
28d1880176
replace find/rfind with startsWith
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
771ead8732
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52731
...
Stop looping when eof is hit.
3 years ago
Miloš Komarčević
c077a06ada
Add more Canon RF lenses and camera IDs
3 years ago
Miloš Komarčević
75f7285487
Remove translatable mark from RF lenses
3 years ago
Miloš Komarčević
ecfdaca525
Add more Canon RF lenses
3 years ago
Miloš Komarčević
1f5bc3b8a5
Avoid buffer reallocation ( #2392 )
3 years ago
Kevin Backhouse
fb6b769817
Merge pull request #2390 from kevinbackhouse/tiffvisitor-safe-add
...
Use Safe::add() in tiffvisitor_int.cpp
3 years ago
Miloš Komarčević
a58e52ed70
Use safe add to prevent overflow
...
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
Use safe add to prevent overflow
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
3 years ago
Miloš Komarčević
eada606992
Match Conan's cmake find module case for Brotli
3 years ago
Miloš Komarčević
9a6ee59421
Support brotli compressed boxes in JPEG XL
3 years ago
Miloš Komarčević
ee698689b4
Exif start can be at any byte in payload, not word aligned
3 years ago
Kevin Backhouse
62705a6615
Use Safe::add() in tiffvisitor_int.cpp
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
Kevin Backhouse
03abb2c109
Merge pull request #2384 from kevinbackhouse/fix-issue-2383
...
Avoid null pointer deref
3 years ago
Kevin Backhouse
222c45c154
Merge pull request #2374 from norbertwg/update_easyAccessAPI
...
several keys added to easyaccess
3 years ago
Kevin Backhouse
6bb956ad80
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52382
...
Avoid null pointer deref.
3 years ago
Kevin Backhouse
b90426dda9
Merge pull request #2378 from kevinbackhouse/fix-issue-2376-2377
...
Fix bugs in QuickTimeVideo::userDataDecoder
3 years ago
Kevin Backhouse
597e372b1c
clang-format
3 years ago
Kevin Backhouse
459910c36a
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51751
...
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52053
Avoid null pointer deref and heap buffer overflow.
3 years ago
Rosen Penev
fd7566fcd8
get rid of nested if conditions
...
Easier to read with lambdas.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
norbertwg
e38d3d9976
several keys added to easyaccess
...
sample easyaccess-test enhanced with additional optional arguments
"category" for easier definition of some tests
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
Kevin Backhouse
a8a35345c8
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51241
...
Fix bounds checking bug.
3 years ago
Kevin Backhouse
b3bd36c749
clang-format
3 years ago
Kevin Backhouse
0db460c9b0
nul-terminate string
3 years ago
Kevin Backhouse
a38e124076
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51707
...
Resize buf to avoid buffer overflow.
3 years ago
Rosen Penev
d856ca7d82
cland-tidy: simplify booleans
...
Found with readability-simplify-boolean-expr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
84f566b4b7
use reference to work around MSVC bug
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
640b0fbf5d
Merge pull request #2346 from kevinbackhouse/fix-issue-2345
...
Fix buffer overflow in QuickTimeVideo::tagDecoder
3 years ago
Kevin Backhouse
56249bb1a0
Use getULong to read unsigned numbers.
3 years ago
Kevin Backhouse
d2253c91f5
Merge pull request #2348 from kevinbackhouse/fix-issue-2270
...
Don't allow zero width/height in WebPImage::inject_VP8X
3 years ago
Kevin Backhouse
bf151a17a3
Don't allow zero width/height in WebPImage::inject_VP8X
3 years ago
Kevin Backhouse
344764a7de
Fix clang-format error.
3 years ago
Kevin Backhouse
bf4f28b727
Avoid potential integer overflow.
3 years ago
Kevin Backhouse
d3651fdbd3
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50901
...
Resize buf to avoid buffer overflow.
3 years ago
Christoph Hasse
337fe1854f
fix(quicktimevideo) avoid out of bounds read, closes #2340
3 years ago
Kevin Backhouse
7a92e1bd0f
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50315
...
Don't allow INT_MIN (0x80000000) because it can cause a UBSAN failure in std::gcd().
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
ce4b9f0ff9
fix(video) dont throw in isQTimeType
3 years ago
Christoph Hasse
3456f30988
fix(video) clang-format quicktimevideo
3 years ago
Christoph Hasse
393815ffb0
fix(video) filetype detection: handle video via quicktimevideo.cpp and other ftyp files in bmffimage
3 years ago
Christoph Hasse
0a948c6a7d
feat(video) revive quicktime.{h,cpp} and adapt to codebase changes.
3 years ago
Christoph Hasse
30dbd13982
fix(video) bmffimage can not currently handle mp42 files so skip those
3 years ago
Rosen Penev
71dc04ebb1
misc sonarlint stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
89d7798f1d
Add more MIME type mappings for TIFF-based raws
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
2fa84f4bab
remove using
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
235b1e0d19
move structured bindings up
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
88fcd234bb
remove pointless x_default variable
...
Just replace it with the string.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b6c2062fae
std::to_string conversions
...
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
Kevin Backhouse
3ac7608282
Merge pull request #2321 from kevinbackhouse/fix-issue-2320
...
Fix integer overflow in printDegrees
3 years ago
Rosen Penev
e151daa0fc
fix compilation without mmap and non win32
...
buf was refactored not to be a pointer.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
fe4f56d979
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49894
...
Check that `60 * rem` won't overflow.
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
9aaeb893ee
don't use w32 sockets for cygwin
...
Not needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
350541f22a
manual replacement of [0] with front()
...
Avoids implicit array decay.
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
e41dd1d227
remove pointless UNUSED statement
...
Does not compile as it is no longer present.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
2b8ca5a9d7
fix compilation with mingw iconv
...
The parameter there is const. Use the appropriate macro.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
7fa6d7378f
Add Nikon3.WhiteBalanceBias2
3 years ago
Rosen Penev
306424f589
remove c_str for fs stuff
...
fs::path is convertable to a string.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b8855fb3b5
misc sonarlint cleanups
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
1602afef0a
const conversions
...
These were not const.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
5e20467e5c
default init static variable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
d4f04296e4
remove explicit constructor
...
No need.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c64ed25c13
remove unused using
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
7b9ba51c4e
enum class conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
6e3db99755
simplify switch statement with returns
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
2e8ce712ec
Use emplace().
3 years ago
Kevin Backhouse
166b5b834d
Replace TiffTreeStruct with std::pair
3 years ago
Kevin Backhouse
3d38e11300
Remove unneeded constructor
3 years ago
Kevin Backhouse
67270c2b11
Use std::unordered_map for TiffTreeStruct lookup.
3 years ago
Kevin Backhouse
be1c00c916
Suggestions from @neheb and @piponazo
3 years ago
Kevin Backhouse
71dfff5a69
Use a switch
3 years ago
Kevin Backhouse
7ec15d247e
Use std::unordered_set for tiffImageTags
3 years ago
Rosen Penev
12b94bc420
get rid of extern const
...
Looks like some pre C++11 thing.
Also fix formatting of these by adding , at the end of the arrays.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
e831219d5c
Correct error from #2301
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
09f61bc3d1
Suggestions from @neheb and @piponazo.
3 years ago
Kevin Backhouse
1fccceeba1
Use std::map for faster lookup.
3 years ago
Rosen Penev
e74feff4d8
strcmp to == conversions
...
Does the same thing.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
d5e42da39e
replace structs with std::pair
...
Simpler.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
0256775408
Merge pull request #1949 from VJSchneid/main
...
add support for more fujifilm tags
3 years ago
Kevin Backhouse
ee5dae4ddd
Fix implicit cast warning.
3 years ago
Kevin Backhouse
4410f46214
Change the return type of the 2Data functions to size_t.
3 years ago
Viktor Schneider
d62220a858
apply clang-format to src/fujimn_int.cpp
3 years ago
Viktor Schneider
73a1a0ec21
Merge remote-tracking branch 'origin'
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
8ba9003f19
Fix clang-tidy warning about double move.
3 years ago
Kevin Backhouse
b0040e3bbe
Convert type of depth parameter to size_t.
3 years ago
Kevin Backhouse
0f1ea7571b
Refactor printTiffStructure depth increment
3 years ago
Kevin Backhouse
46f2ef8009
Refactor printIFDStructure depth increment
3 years ago
Kevin Backhouse
39239cef68
Merge pull request #2296 from kevinbackhouse/tiff-offset-size_t
...
Use size_t for the offset argument in TiffComponent
3 years ago
Kevin Backhouse
89040ad1de
Fix implicit type conversions.
3 years ago
Kevin Backhouse
d8bd05f4e8
Use size_t
3 years ago
Kevin Backhouse
beaee05062
Change type of sizeDataArea_
3 years ago
Kevin Backhouse
30debd2635
Use size_t for the offset.
3 years ago
Rosen Penev
e34395e095
replace shared_ptr with make_shared
...
The former creates a nullptr. The latter actually allocates.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c03af98725
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
5a08e33fd8
sonarlint: replace loop with find_if
...
Sonarlint complains about this loop for some reason. Convert to find_if
to fix.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
aae02babba
sonarlint: replace lock_guard with scoped_lock
...
C++17 allows scoped_lock, which sonarlint recommends.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
5d2d47032b
replace [0] with front() where applicable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
1958e70a71
Use int32_t in TimeValue
3 years ago
Kevin Backhouse
3db7598e29
Don't use long in floatToRationalCast
3 years ago
Rosen Penev
49679640e8
make_unique conversions
...
Requires pointer hack for MSVC.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
3ae1d3b48e
return make_unique directly
...
Simpler
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
Rosen Penev
5479792d50
remove pointless &*
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
f3b08d506e
const ref conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
a6c30dd1dd
make upper the same as lower
...
Small cleanup
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b8eaae649d
use some auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b793409eb6
find_if and lambda conversions
...
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
Rosen Penev
9766c4532d
fix some gcc -Weffc++ warnings
...
Mostly deleted member functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
543c951bde
clang-tidy: use '' for find
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
4544fd826c
Add more Nikon Z lenses
3 years ago
Miloš Komarčević
ca5f88d519
Add Nikon LensData v0802
3 years ago
Rosen Penev
176210567f
remove friend operator
...
Seems to be unused. It's also inconsistent between various clang-format
versions.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Peter
94f8889cd3
Update olympus tags ( #2246 ) ( #2249 )
...
Update translation output of `Exif.OlympusCs.ArtFilter`/`Exif.OlympusCs.MagicFilter`, `Exif.OlympusCs.ImageStabilization` and `Exif.OlympusCs.WhiteBalance` tags.
Fix `Exif.OlympusCs.ImageStabilization` type from `unsignedShort` to `unsignedLong`.
Closes #2246 .
Ref: Exiftool Olympus tags and Olympus E-M10 Mark II instuction manual.
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
90f794f13e
Merge pull request #2277 from kevinbackhouse/iptcDataSegs
...
Simplify the iptcDataSegs logic in jpgimage.cpp
3 years ago
Kevin Backhouse
97e58a4573
Merge pull request #2267 from neheb/clang
...
mostly clang-tidy fixes
3 years ago
Kevin Backhouse
8e5b8113e7
Use emplace_back
3 years ago
Kevin Backhouse
2c31430ecd
Merge pull request #2275 from kevinbackhouse/vector-access
...
Fix some "unsafe vector access" warnings
3 years ago
Kevin Backhouse
a608138f5f
Simplify the iptcDataSegs logic
3 years ago
Kevin Backhouse
62043c18ab
clang-format
3 years ago
Kevin Backhouse
b9b2d7741b
Fix some "unsafe vector access" warnings.
3 years ago
Kevin Backhouse
3f7cb78a3b
Move enums from tags_int.hpp to tags.hpp
3 years ago
Kevin Backhouse
0c3da129f2
Replace assert with enforce. (Fix for https://github.com/Exiv2/exiv2/issues/2268 )
3 years ago
Kevin Backhouse
7f673c766d
Fix some "signed shift" warnings
3 years ago
Rosen Penev
5be42f132c
try to fix some fanalyzer warnings
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c0083d6788
clang-tidy: fix mismatching declaration variable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
7f9242afc6
clang-tidy: replace + with append()
...
Silences clang-tidy performance warning
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
fc1a398488
clang-tidy: remove const
...
It doesn't do what it's supposed to here.
Found with misc-misplaced-const
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
84555f1ad5
clang-tidy: no else after return
...
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
60b3e28e0b
Merge pull request #2266 from kevinbackhouse/signed-shift
...
Fix some "signed shift" warnings
3 years ago
Kevin Backhouse
1ada360774
Fix some incorrect format specifiers.
3 years ago
Kevin Backhouse
b3f2ab5988
Fix some "signed shift" warnings.
3 years ago
Kevin Backhouse
08a68c3606
Merge pull request #2251 from kevinbackhouse/basicio-ftell
...
Change return type of BasicIo::tell() to size_t
3 years ago
Kevin Backhouse
5e4eab0012
Merge pull request #2248 from Exiv2/hassec_fix_2247
...
fix naming of canon EF 35-80mm. closes #2247
3 years ago
Rosen Penev
bae7da19ca
clang-tidy: use default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
c2fbff291e
PNG: always strip the existing iCCP chunk
3 years ago
Kevin Backhouse
ad4e13b827
Change return type of BasicIo::tell() to size_t.
3 years ago
Christoph Hasse
16d72c9945
fix naming of canon EF 35-80mm.closes #2247
3 years ago
Rosen Penev
cf963e9e4d
clang-tidy: C casts to C++
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
a98954a98e
clang-tidy: add missing special member functions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b4c90b5e16
clang-tidy: replace pointer magic with data()
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
93dc63b389
Merge pull request #2215 from Exiv2/add_f_lenses
...
Add some F mount lenses
3 years ago
Miloš Komarčević
e00422ae52
Account for header bytes for Exif and XMP boxes
3 years ago
Viktor Schneider
e185c5843f
use correct type for element counter in printFujiFaceElementTypes
3 years ago
Viktor Schneider
6bbaa31409
apply clang-format rules to fujimn_int.cpp
3 years ago
Viktor Schneider
f3258027f4
fix some rebase issues
3 years ago
Viktor Schneider
88bc575b7b
add comment that fujiColor value 512 differs from exiftool
3 years ago
Viktor Schneider
b8e378b85e
fix typo in fujiSharpness and prevent undefined behaviour when shifting signed values
3 years ago
Viktor Schneider
040b106b0a
remove TODO entries
3 years ago
Viktor Schneider
f9cbf2438a
add some fujifilm tags from exiftool and extend TagDetails
3 years ago
Viktor Schneider
967f6a6265
remove redundant TagDetails and fix formatting
...
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
3 years ago
Viktor Schneider
21d07634ae
print newer labels first when interpreting Fujifilm tags
3 years ago
Viktor Schneider
c4ba70caeb
remove auto range for DynamicRangeAuto setting
3 years ago
Viktor Schneider
4a3cf6b3de
add support for more fujifilm tags
3 years ago
Rosen Penev
0dcd8605c9
fix mmap compilation
...
CI doesn't catch all cases failing.
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
d59e1433c0
replace readlink with std::filesystem
...
Simpler.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
707e22c577
Add some F mount lenses
3 years ago
Rosen Penev
bd1758c3c5
remove some double pointer stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
65c5b772c9
fix misplaced const
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c9c2a1847b
remove const std::function
...
std::move is used.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
2e721a716e
std::function conversions
...
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
Rosen Penev
151b54ab3e
remove default constructor
...
This is rule of zero.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
2b74cc885d
Revert some boilerplate which is not needed
3 years ago
Luis Díaz Más
d4ffcb9497
utils are in Internal namespace
3 years ago
Luis Díaz Más
cc79051b79
Move 1-liner to header file
3 years ago
Luis Díaz Más
ee855c0e71
Reduce amount of string transformations
3 years ago
Luis Díaz Más
d5742f449b
Move string helpers to utils
3 years ago
Luis Díaz Más
1a3e93856b
More tests for rational convertions
3 years ago
Luis Díaz Más
8da71e7133
Test parseUint32 and fix it when number is out of limits
3 years ago
Luis Díaz Más
331924612e
Remove duplication by using templates
3 years ago
Luis Díaz Más
2b91b5daf9
More tests for DataBuf read/write functions
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
c3d0100d48
Fixing bad usages of DataBuf (when it is empty)
3 years ago
Luis Díaz Más
4a4a8c544c
Throwing when trying to access TooFar elements in DataBuf
3 years ago
Luis Díaz Más
941017d281
Fix issues on ARM builds ( #2205 )
...
* Specify base class initialization in Copy Constructor
* Fix printing of uint64_t variable in ARM 32bits
Use cinttypes
* Fix alignment issues on ARM 32 bits
* tests: add assertion with custom message
3 years ago
Rosen Penev
6203ded16f
add constexpr constructor
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
8d2e1926ca
remove unused class declarations
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
f07c88de5d
Use .front() to avoid warning from static analysis
3 years ago
Luis Díaz Más
4d99c2aca1
Use std::pair to return multiple values
3 years ago
Luis Díaz Más
4ee9c35799
Include missing iostream header in photoshop.cpp
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
400632f27b
Factor out function readSegmentSize()
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
Luis Diaz
b00e460d76
Move static functions to anonymous namespace
3 years ago
Rosen Penev
c997b09a81
algorithm conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
d789968e90
replace malloc/free with new/delete
...
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
ae66ecec0d
clang-tidy: use nullptr
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
49bf7e1387
clang-tidy: use delete
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
e654b2931c
clang-tidy: replace throw() with noexcept
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
1f05448d0e
clang-tidy: default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
0d971e98e4
remove some unique_ptrs
...
They're not really used as pointers.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
89b8d4ea4e
try to actually fix null pointer deref
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
25ef5d7e77
replace ret variable with return statement
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
7bc9861301
clang-tidy: use strcmmp properly
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
7a826ac529
clang-tidy: add parentheses to macros
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
cacb54eaba
use auto
...
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
a505d6f06c
More unit tests for Photoshop methods
3 years ago
Luis Diaz
8ab7800477
Remove 2nd param from Photoshop::isIrb() since it is always hardcoded
3 years ago
Luis Díaz Más
e715243aa5
Fix integer overflow #2179
3 years ago
Luis Díaz Más
6e9eca445a
Merge pull request #2177 from neheb/1
...
clang-tidy and manual stuff
3 years ago
Luis Díaz Más
bd68c14de5
Detect integer-overflow and throw in that case
3 years ago
Rosen Penev
262d0ee4b3
struct to std::pair conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
e82be13b73
C to std::function
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
e9896d1f99
clang-tidy: fix inconsistent decleration
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
d190baac6c
clang-tidy: do not use using namespace
...
Found with google-build-using-namespace
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
c35fb7104b
clang-tidy: use any_of
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
3298fcf656
some chrono
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b25e75dd7b
replace Sleep with sleep_for
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
dfb93dd8cd
clang-tidy: use C++ headers
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
aa41d557b2
function move
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
06d977d7bc
clang-tidy: use default
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
9f67620503
clang-tidy: add more nodiscard
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b72e4b0e44
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
d16ca65b01
Fix out of bounds read in isValidBoxFileType()
3 years ago
Luis Díaz Más
3b9fcb4b3d
Update .clang-format to align pointers to the types
3 years ago
Luis Díaz Más
790fc465f4
Merge pull request #2172 from Exiv2/mergify/bp/main/pr-2167
...
Initial support for OM System MakerNote (backport #2167 )
3 years ago
Rosen Penev
fafe999c6e
remove unused var from deleted stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
8fa30d66b4
Initial support for OM System MakerNote
...
(manually adapted from 916436903d34b88ea0d49c5084c51e02cfae9bfb)
3 years ago
Rosen Penev
c0868aff31
std::function
...
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
043547cbd0
remove various usages of memset
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
bad4712df8
static constexpr conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
9dc35e7380
find to std::find
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
9cb1fcef5c
std::array 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
5b0418d136
Improve compare function: no need to count chars
3 years ago
Luis Díaz Más
b05573fadc
Remove most of the asserts from codebase
3 years ago
Luis Díaz Más
1ad9e52f3c
Fix windows build
3 years ago
Luis Díaz Más
1545a1bc4a
JP2 - stronger checks on Signatuer and FileType boxes
3 years ago
Luis Díaz Más
e7478f744d
Jp2Image: Implement more checks from JP2 standard + fix bug
...
- add debug info when parsing Signature box
- Move definitions & static stuff to anonymous namespace
- cleanup while studying code
- Make exceptions more similar to other formats
3 years ago
Luis Diaz
b48e8e9379
Add unit tests for Jp2Image revealing bugs (see #2147 )
3 years ago
Rosen Penev
5d5354edee
clang-tidy: C array to std::array 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 Díaz Más
573c3c79fc
Merge pull request #2145 from Exiv2/mainSizeT_n
...
More migration to size_t
3 years ago
Jim Easterbrook
04ae6c2c4c
Add key name to "Value not set" error message ( #2149 )
...
The error typically occurs when writeMetadata() is called. It's easier
to find the problem if you know which datum hasn't had a value set.
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 Diaz
fa24fb22ca
Use compiler deduction guides for error list
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
5d08bb9bec
Merge pull request #2146 from Exiv2/mainDatesWithZeros
...
DateValue is now a bit more permissive with malformed dates
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 Diaz
56c52be8b5
DateValue is now a bit more permissive with malformed dates
3 years ago
Luis Díaz Más
5c36c690f9
Merge pull request #2137 from Exiv2/mainRecoverRecordId
...
Recover IptDataSets::recordId in the API
3 years ago
Luis Díaz Más
a009ac1f61
Merge pull request #2135 from neheb/1
...
manual nullptr removals
3 years ago
Luis Diaz
c1ae1bcb03
Recover IptDataSets::recordId in the API
3 years ago
Rosen Penev
8dadcdf72a
manual nullptr removals
...
unique_ptr has a bool overload. It's also easier to reason about.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
784cbe2965
manual move conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević
eb49d66caf
Strip XMP raw packet before decoding
3 years ago
Rosen Penev
b8304fffa4
clang-tidy: don't use C casts
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
89e66ffd37
Merge pull request #2132 from neheb/2
...
misc cleanups
3 years ago
Luis Díaz Más
f894ee0568
Fix debug builds
3 years ago
Luis Díaz Más
c0a3242e73
C++-style headers
3 years ago
Rosen Penev
c2bcd4b08e
replace EXV_COUNTOF with std::size
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
61a5d8594c
remove some new
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
17a13072e6
manual unimplemented operator = delete
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b3823f4c8d
conversions to make_unique
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b6bdbf5574
clang-tidy: don't use else after return/throw
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
9f949195e4
clang-tidy: add ending namespace comment
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
09ca3ca1f2
manual namespace concatenations
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
c146ae5215
Fix mac build
3 years ago
Luis Díaz Más
bbc99ae581
Use auto for unique pointers
3 years ago