79 Commits (169b6364a84b64c83348c5c4de7016e5ea1f4507)

Author SHA1 Message Date
Rosen Penev 169b6364a8 clang-tidy: replace endl with '\n'
Found wth performance-avoid-endl

Signed-off-by: Rosen Penev <rosenp@gmail.com>
10 months ago
Miloš Komarčević e843bc4834 Print compression in RAF header structure 1 year ago
Miloš Komarčević f551534e17 RAF: get actual sensor dimensions 2 years ago
Miloš Komarčević e9ba89411b Use appropriate print format specifiers and constants 2 years ago
Miloš Komarčević de8f1bd849 Apply suggestions from code review
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
2 years ago
Miloš Komarčević 10d233dad2 RAF: extract more details when printing structure 2 years ago
Rosen Penev b1225ca9dc remove stringFormat from Error()
No need.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
luzpaz 39a4b9b930 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot,*.ts,./doc/ChangeLog,./xmpsdk -L alis,discus,filetest,ist,nd,ois,optio,siz,te,tempdate`
Excluded 3rd-party code (ie ./xmpsdk)
2 years ago
Miloš Komarčević 05ccb5ae58
Merge pull request #2613 from cytrinox/fuji_xmp_fix
Extract XMP data from embedded JPEG preview inside RAF files
2 years ago
Daniel Vogelbacher c493e38d5a RAF: Copy comment from embedded JPEG image 2 years ago
Daniel Vogelbacher f5f1f30f5b RAF: Ignore JPEG decoder errors if the JPEG offsets are invalid 2 years ago
Daniel Vogelbacher d27c5ac838 RAF: Simplify metadata extraction
Remove manual TiffParser usage for reading APP1 segement,
instead use JpegImage for proper parsing.
2 years ago
Daniel Vogelbacher 6c4b6d9d7f Extract XMP data from embedded JPEG preview inside RAF files
The Fujifilm X-T5 camera stores in-camera rating for RAF images
by using XMP. But the XMP data is not directly encoded into the
RAF structure - instead it is attached as a second APP1 segment
to the embedded JPEG preview file.

This patch extracts the JPEG preview and parses it like a standalone
JPEG file.
2 years ago
Rosen Penev 37184fd713 fix print format
Allows the compiler to actually diagnose formats.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 22b12012a6 more SonarLint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev b9d94e61fe coverity: remove dead code
Found with: CID 1521533
Unsigned compared against 0 (NO_EFFECT)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 376638259d namespace enforce.hpp functions to Internal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 842ef05ee6 return nullptr instead of reset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse b0040e3bbe
Convert type of depth parameter to size_t. 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
Luis Díaz Más 2b74cc885d Revert some boilerplate which is not needed 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 30bf563f4d Update .clang-format file & apply clang-format to whole project 3 years ago
Luis Diaz 4355d635d4 More conversions to size_t while removing static_casts 3 years ago
Luis Díaz Más 96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 3 years ago
Luis Díaz Más f894ee0568 Fix debug builds 3 years ago
Luis Díaz Más b3a216310a Removing unused headers thanks to IWYU 3 years ago
Rosen Penev 04bacdedd6 clang-tidy: use auto
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 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 90aa007188
Convert type of pixelHeight/pixelWidth to platform-independent uint32_t. 3 years ago
Luis Díaz Más ea201ce613 Remove dead code 3 years ago
Luis Díaz Más a6185d29c6 Image::setComment now takes string_view 3 years ago
Kevin Backhouse 256365830a
Replace Metadatum::toLong() with Metadatum::toInt64(). 3 years ago
Luis Díaz Más 0f03e77634 Simplify code around UniquePtr(s) & use make_unique over new 3 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
mergify[bot] 66259b1c71
Check if embedded RAF image is really a TIFF (backport #1796) (#1851)
* Check if embedded RAF image is really a TIFF

(cherry picked from commit be12ae6f9e2f053bf101902865deadfe7c937f8d)

* Clarify comment on old vs new RAF

Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
(cherry picked from commit 30f39ac98c1671547aa0b4021081e374864f1f04)

* Check I/O read result on RAF inspection

Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
(cherry picked from commit 09de8dc901a38555151bd87d89ada3bd931451ea)

* Add test

(cherry picked from commit 9c3db7f3c3cb48fe0669061e627174402f366816)

Co-authored-by: Miloš Komarčević <miloskomarcevic@aim.com>
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
4 years ago
Rosen Penev 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más f85f7f717a Replace many of the iterators types with auto 4 years ago
Luis Díaz Más 0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
Robin Mills a71eb24956 Pointless change to trigger CI to build again. 5 years ago
Robin Mills 45119e3260 WIP: working to understand how to support tiffIfd in tiffvisitor_int.cpp 5 years ago
Robin Mills 76514a1654 WIP #1402 rafimage::printStructure() improved formatting. 5 years ago
Luis Díaz Más 113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
6 years ago
Kevin Backhouse 109d5df7ab Check bounds of jpg_img_off and jpg_img_len. (#858) 6 years ago
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
7 years ago