Commit Graph

264 Commits

Author SHA1 Message Date
Kevin Backhouse
a5c521ea57
Merge pull request #2252 from neheb/2
clang-tidy: use default member init
2022-07-05 23:07:08 +01:00
Kevin Backhouse
1ada360774 Fix some incorrect format specifiers. 2022-07-05 10:54:19 -07:00
Rosen Penev
bae7da19ca clang-tidy: use default member init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-03 12:24:41 -07:00
Kevin Backhouse
ad4e13b827
Change return type of BasicIo::tell() to size_t. 2022-06-21 17:05:10 +01:00
Rosen Penev
b4c90b5e16 clang-tidy: replace pointer magic with data()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-21 17:14:58 -07:00
Luis Díaz Más
25c47cd1cf
Merge pull request #2197 from Exiv2/mainRefactoringFormats
Refactoring in JpegImage and Photoshop classes
2022-04-10 13:23:33 +02:00
Luis Díaz Más
f942ba89bd Move Photoshopb class to internal namespace 2022-04-10 10:55:10 +02:00
Rosen Penev
0d971e98e4 remove some unique_ptrs
They're not really used as pointers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-10 01:40:34 -07:00
Rosen Penev
9dc35e7380 find to std::find
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-26 14:32:22 -07:00
Luis Díaz Más
d7f35e33f0 Remove useless static_casts 2022-03-25 08:43:37 +01:00
Luis Díaz Más
ae4df71233 Remove DataBuf::copyBytes and use std::copy instead 2022-03-23 17:17:29 +01:00
Luis Díaz Más
b05573fadc Remove most of the asserts from codebase 2022-03-23 16:55:18 +01:00
Luis Díaz Más
30bf563f4d Update .clang-format file & apply clang-format to whole project 2022-03-16 22:30:53 +01:00
Rosen Penev
b2b6d834ba
some std::array conversions (#2148)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-15 10:17:06 +01:00
Luis Diaz
7576a2757b More size_t for sizes 2022-03-14 11:50:42 +01:00
Luis Díaz Más
96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 2022-03-12 16:58:40 +01:00
Luis Díaz Más
c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
Include what you use + more SPDX identifiers + few other cleanups
2022-03-11 21:02:45 +01:00
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>
2022-03-09 17:12:29 -08:00
Luis Díaz Más
8b1fe379a1 Removing unused headers thanks to IWYU 2022-03-07 22:25:47 +01:00
Luis Díaz Más
3f3b651c04 Remove unused stuff 2022-03-07 22:25:35 +01:00
Luis Díaz Más
23da0c3955 Do not define not needed stuff 2022-03-07 22:25:35 +01:00
Rosen Penev
04bacdedd6 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -08:00
Rosen Penev
118aa78aa0 clang-tidy: use braced init list
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -08:00
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
2022-03-04 11:44:39 +01:00
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
2022-02-27 09:41:47 +01:00
Luis Díaz Más
5d627433fc Remove useless DataBuf::clear() 2022-02-27 09:36:46 +01:00
Luis Díaz Más
c5a9dfd9af
Merge pull request #2109 from Exiv2/main_StringView
Refactoring & cleanup
2022-02-21 22:29:43 +01:00
Luis Díaz Más
8b3da36f42 Improvements from code review 2022-02-19 17:27:29 +01:00
Kevin Backhouse
90aa007188
Convert type of pixelHeight/pixelWidth to platform-independent uint32_t. 2022-02-18 22:17:32 +00:00
Luis Díaz Más
ea201ce613 Remove dead code 2022-02-18 18:01:02 +01:00
Luis Díaz Más
a6185d29c6 Image::setComment now takes string_view 2022-02-18 18:01:02 +01:00
Luis Díaz Más
0726104b1a Hide pathOfFileUrl in the only place where it is used 2022-02-18 17:54:04 +01:00
Luis Díaz Más
408d80bce8 Change order of ImageType values 2022-02-14 17:08:50 +01:00
Luis Díaz Más
f10283f118 bug: Fix crash when calling ImageFactory::create(none) 2022-02-14 17:08:50 +01:00
Luis Díaz Más
5a9799ffb2 Replace ImageType namespace by a enum class 2022-02-14 17:08:50 +01:00
Luis Díaz Más
7933ff401d Remove dead code around EXV_UNICODE_PATH 2022-02-13 22:49:32 +01:00
Luis Díaz Más
0f03e77634 Simplify code around UniquePtr(s) & use make_unique over new 2022-02-05 11:02:04 +01:00
Luis Díaz Más
a94d648d05 Rest of tests to have 100% coverage in BMP class 2022-02-04 17:21:10 +01:00
Kevin Backhouse
6758e7288d
Merge branch 'main' into fix_exiv2_-pR 2021-11-24 12:58:53 +00:00
postscript-dev
bd676bedc6
Fix exiv2 -pR for Sony images (#1805)
`exiv2 -pR` failed to process Sony makernotes. Fix checks if
makernotes header has Sony string, then uses correct offset.

Fix supplied by @clanmills
2021-11-02 16:08:39 +00:00
Kevin Backhouse
68473d9d10
Remove static functions readOrThrow and seekOrThrow. 2021-10-21 10:18:21 +01:00
Kevin Backhouse
44542a9f94
Add readOrThrow and seekOrThrow to BasicIo. 2021-10-21 10:18:21 +01:00
Kevin Backhouse
81cfc162c1
Use std::move to transfer ownership of DataBufs. 2021-10-10 23:56:00 +01:00
Kevin Backhouse
9ff72e5ca5
Make offset=0 the default parameter. 2021-08-30 12:41:08 +01:00
Kevin Backhouse
c9d0cf3643
Make fields of DataBuf private. 2021-08-29 15:43:10 +01:00
Kevin Backhouse
593fcbd865
Add fuzzing dictionary and test all printStructure() options 2021-07-27 22:51:13 +01:00
Kevin Backhouse
c3239e3187 &bytes[0] will crash if bytes has zero elements.
(cherry picked from commit 3e72d129e53b14e0b62d74aefed6bbd326562d63)
2021-07-25 20:34:35 +00:00
Kevin Backhouse
e4e3362284
Defensive programming in Image::printIFDStructure 2021-07-15 22:27:10 +01:00
Kevin Backhouse
caf08b229e
dirLength == 0 can cause an infinite loop. 2021-07-15 22:15:30 +01:00
Kevin Backhouse
2b84f4bd64
fix: zero initialize local variables. (#1743)
* Zero initialize local variables.

* Initialize xmpID_
2021-06-27 08:56:31 +02:00