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.
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>
* 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
- 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
* 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>
- 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