Loading...
Searching...
No Matches
rw2image.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef RW2IMAGE_HPP_
#define RW2IMAGE_HPP_
// *****************************************************************************
#include "exiv2lib_export.h"
// included header files
#include "image.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// class definitions
class EXIV2API Rw2Image : public Image {
public:
explicit Rw2Image(BasicIo::UniquePtr io);
void printStructure(std::ostream& out, PrintStructureOption option, size_t depth) override;
void readMetadata() override;
void writeMetadata() override;
void setExifData(const ExifData& exifData) override;
void setIptcData(const IptcData& iptcData) override;
void setComment(const std::string&) override;
[[nodiscard]] std::string mimeType() const override;
[[nodiscard]] uint32_t pixelWidth() const override;
[[nodiscard]] uint32_t pixelHeight() const override;
}; // class Rw2Image
class EXIV2API Rw2Parser {
public:
static ByteOrder decode(ExifData& exifData, IptcData& iptcData, XmpData& xmpData, const byte* pData, size_t size);
}; // class Rw2Parser
// *****************************************************************************
// template, inline and free functions
// These could be static private functions on Image subclasses but then
// ImageFactory needs to be made a friend.
EXIV2API Image::UniquePtr newRw2Instance(BasicIo::UniquePtr io, bool create);
EXIV2API bool isRw2Type(BasicIo& iIo, bool advance);
} // namespace Exiv2
#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