Commit Graph

227 Commits

Author SHA1 Message Date
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
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
2021-06-01 12:39:10 +02:00
Christoph Hasse
758dd6bbc6 refactor!: remove free() function from DataBuf to avoid potential problems, see #1542 2021-05-27 08:26:00 +02:00
Rosen Penev
2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-26 08:31:45 +02:00
Rosen Penev
743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:29:02 +02:00
Rosen Penev
ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:45:20 +02:00
Rosen Penev
b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 21:52:03 +02:00
Rosen Penev
1b9b77c51f clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:34:09 +02:00
Rosen Penev
091fd77885 clang-tidy: remove redundant member init
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 16:45:12 +02:00
Rosen Penev
2e73aa9dc0 default con/destructors in headers
Helps to optimize trivially destructable stuff.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 09:10:36 +02:00
Rosen Penev
9642e3cceb clang-tidy: remove pointless string init
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 07:12:15 +02:00
Rosen Penev
1dc1186760 clang-tidy: simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 17:30:46 +02:00
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>
2021-05-09 15:18:50 +02:00
Luis Díaz Más
8314030604 Revert "Remove deprecated EPS format"
This reverts commit 537cdad99e.
2021-04-22 18:39:31 +02:00
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
2021-04-18 18:49:58 +02:00
Luis Díaz Más
b5d3a1fd70 auto_ptr -> unique_ptr for code with WIN_UNICODE enabled 2021-04-18 09:44:51 +02:00
Luis Díaz Más
3eb1eee7fe Remove deprecated RiffVideo support 2021-04-18 09:44:51 +02:00
Luis Díaz Más
061ec1a75d Remove deprecated QuickTime support 2021-04-18 09:44:51 +02:00
Luis Díaz Más
8dcc07887a Remove deprecated Matroska support 2021-04-18 09:44:51 +02:00
Luis Díaz Más
94b87a8dec Remove deprecated SSH support 2021-04-18 09:44:51 +02:00
Luis Díaz Más
0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 2021-04-15 06:56:11 +02:00
Luis Díaz Más
537cdad99e Remove deprecated EPS format 2021-04-15 06:56:11 +02:00
Robin Mills
d632988bbd Massive code prolog cleanup. 2021-03-17 13:34:21 +00:00
Miloš Komarčević
0da1a50afe Revert style changes 2021-03-08 18:18:17 +01:00
Miloš Komarčević
e09d093ccf Minor whitespace formatting 2021-03-08 11:58:06 +01:00
Peter Kovář
f0a321dedb [WIP] Base Media File Format 2021-02-16 10:10:00 +01:00
Robin Mills
0844e1bbfb Rename class ISOBMFF => class bmffImage to match other image handlers. Removed C++11 style code. Removed unused code. 2021-01-25 16:15:55 +00:00
Robin Mills
460a802671 Fix image handler to give jp2image code higher priority than the next isobmff code. 2021-01-24 22:20:42 +00:00
Peter Kovář
92469f4c27 [WIP] Add ISO/IEC Base Media File Format 2021-01-24 15:09:57 +01:00
clanmills
48afa7548d fix_1329_remove_bigtiff_0.27 2020-09-28 07:43:06 +01:00
tbeu
f61fa2ed9d
Fix write ability flags of PSD files (#1260) 2020-08-10 20:08:12 +02:00
clanmills
d07a1f94f8 fix_547_0.27 2020-05-19 16:13:37 +01:00
clanmills
cc1a6033db fix_1045_0.27 2020-04-06 12:56:43 +01:00
clanmills
18ed65a25f fix_Sony2010e_0.27 Thanks to @sridharb1 2020-03-29 17:55:37 +01:00
Robin Mills
43683f1eff Fix #531 2018-12-09 18:54:40 +01:00
Luis Díaz Más
ae49250942 Check in Image::printIFDStructure if seek and reads are OK 2018-11-06 14:40:36 +01:00
Dan Čermák
962962a8e9 Port Iptc::printStructure & getUshort to slices API
This fixes #211, #210, #209
2018-10-11 14:06:16 +02:00
Dan Čermák
fec6535ae8 [binaryToString] Reimplement using Slices
- reimplement binaryToString:
  - it now accepts a Slice and nothing else
  - it does not return a std::string but instead a proxy object that implements
    operator<< (this should be more efficient, as we do not need to touch the
    heap in most cases)
- addapt unit tests
- replace all occurences with the new API
2018-10-11 14:06:16 +02:00