| Exiv2

Loading...
Searching...
No Matches
rw2image.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#ifndef RW2IMAGE_HPP_
4#define RW2IMAGE_HPP_
5
6// *****************************************************************************
7#include "exiv2lib_export.h"
8
9// included header files
10#include "image.hpp"
11
12// *****************************************************************************
13// namespace extensions
14 namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
23 class EXIV2API Rw2Image : public Image {
24 public:
26
27
39 explicit Rw2Image(BasicIo::UniquePtr io);
41
43
44 void printStructure(std::ostream& out, PrintStructureOption option, size_t depth) override;
45 void readMetadata() override;
50 void writeMetadata() override;
55 void setExifData(const ExifData& exifData) override;
60 void setIptcData(const IptcData& iptcData) override;
65 void setComment(const std::string&) override;
67
69
70 [[nodiscard]] std::string mimeType() const override;
71 [[nodiscard]] uint32_t pixelWidth() const override;
72 [[nodiscard]] uint32_t pixelHeight() const override;
74}; // class Rw2Image
75
81 class EXIV2API Rw2Parser {
82 public:
88 static ByteOrder decode(ExifData& exifData, IptcData& iptcData, XmpData& xmpData, const byte* pData, size_t size);
89
90}; // class Rw2Parser
91
92// *****************************************************************************
93// template, inline and free functions
94
95// These could be static private functions on Image subclasses but then
96// ImageFactory needs to be made a friend.
102EXIV2API Image::UniquePtr newRw2Instance(BasicIo::UniquePtr io, bool create);
103
105EXIV2API bool isRw2Type(BasicIo& iIo, bool advance);
106
107} // namespace Exiv2
108
109#endif // #ifndef RW2IMAGE_HPP_
Exiv2::BasicIo
An interface for simple binary IO.
Definition basicio.hpp:35
Exiv2::BasicIo::UniquePtr
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
Exiv2::ExifData
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition exif.hpp:379
Exiv2::Image::Image
Image(ImageType type, uint16_t supportedMetadata, BasicIo::UniquePtr io)
Constructor taking the image type, a bitmap of the supported metadata types and an auto-pointer that ...
Definition image.cpp:132
Exiv2::Image::io
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:696
Exiv2::Image::iptcData
virtual IptcData & iptcData()
Returns an IptcData instance containing currently buffered IPTC data.
Definition image.cpp:536
Exiv2::Image::exifData
virtual ExifData & exifData()
Returns an ExifData instance containing currently buffered Exif data.
Definition image.cpp:532
Exiv2::Image::UniquePtr
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
Exiv2::IptcData
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:153
Exiv2::Rw2Image::pixelWidth
uint32_t pixelWidth() const override
Return the pixel width of the image.
Definition rw2image.cpp:33
Exiv2::Rw2Image::pixelHeight
uint32_t pixelHeight() const override
Return the pixel height of the image.
Definition rw2image.cpp:40
Exiv2::Rw2Image::printStructure
void printStructure(std::ostream &out, PrintStructureOption option, size_t depth) override
Print out the structure of image file.
Definition rw2image.cpp:62
Exiv2::Rw2Image::setIptcData
void setIptcData(const IptcData &iptcData) override
Todo: Not supported yet, requires writeMetadata(). Calling this function will throw an Error(ErrorCod...
Definition rw2image.cpp:52
Exiv2::Rw2Image::writeMetadata
void writeMetadata() override
Todo: Write metadata back to the image. This method is not yet implemented. Calling it will throw an ...
Definition rw2image.cpp:182
Exiv2::Rw2Image::setComment
void setComment(const std::string &) override
Not supported. RW2 format does not contain a comment. Calling this function will throw an Error(Error...
Definition rw2image.cpp:57
Exiv2::Rw2Image::readMetadata
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition rw2image.cpp:78
Exiv2::Rw2Image::Rw2Image
Rw2Image(BasicIo::UniquePtr io)
Constructor to open an existing RW2 image. Since the constructor can not return a result,...
Definition rw2image.cpp:26
Exiv2::Rw2Image::setExifData
void setExifData(const ExifData &exifData) override
Todo: Not supported yet, requires writeMetadata(). Calling this function will throw an Error(ErrorCod...
Definition rw2image.cpp:47
Exiv2::Rw2Image::mimeType
std::string mimeType() const override
Return the MIME type of the image.
Definition rw2image.cpp:29
Exiv2::Rw2Parser
Stateless parser class for data in RW2 format. Images use this class to decode and encode RW2 data....
Definition rw2image.hpp:81
Exiv2::Rw2Parser::decode
static ByteOrder decode(ExifData &exifData, IptcData &iptcData, XmpData &xmpData, const byte *pData, size_t size)
Decode metadata from a buffer pData of length size with data in RW2 format to the provided metadata c...
Definition rw2image.cpp:187
Exiv2::XmpData
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition xmp_exiv2.hpp:138
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::PrintStructureOption
PrintStructureOption
Options for printStructure.
Definition image.hpp:38
Exiv2::isRw2Type
EXIV2API bool isRw2Type(BasicIo &iIo, bool advance)
Check if the file iIo is a RW2 image.
Definition rw2image.cpp:203
Exiv2::newRw2Instance
EXIV2API Image::UniquePtr newRw2Instance(BasicIo::UniquePtr io, bool create)
Create a new Rw2Image instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition rw2image.cpp:195
Exiv2::ByteOrder
ByteOrder
Type to express the byte order (little or big endian).
Definition types.hpp:34