Exiv2
Loading...
Searching...
No Matches
mrwimage.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#ifndef MRWIMAGE_HPP_
4#define MRWIMAGE_HPP_
5
6// *****************************************************************************
7#include "exiv2lib_export.h"
8
9// included header files
10#include "image.hpp"
11
12// *****************************************************************************
13// namespace extensions
14namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
22class EXIV2API MrwImage : public Image {
23 public:
25
26
41 MrwImage(BasicIo::UniquePtr io, bool create);
43
45
46 void readMetadata() override;
51 void writeMetadata() override;
56 void setExifData(const ExifData& exifData) override;
61 void setIptcData(const IptcData& iptcData) override;
66 void setComment(const std::string&) override;
68
70
71 [[nodiscard]] std::string mimeType() const override;
72 [[nodiscard]] uint32_t pixelWidth() const override;
73 [[nodiscard]] uint32_t pixelHeight() const override;
75}; // class MrwImage
76
77// *****************************************************************************
78// template, inline and free functions
79
80// These could be static private functions on Image subclasses but then
81// ImageFactory needs to be made a friend.
87EXIV2API Image::UniquePtr newMrwInstance(BasicIo::UniquePtr io, bool create);
88
90EXIV2API bool isMrwType(BasicIo& iIo, bool advance);
91
92} // namespace Exiv2
93
94#endif // #ifndef MRWIMAGE_HPP_
An interface for simple binary IO.
Definition basicio.hpp:35
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition exif.hpp:379
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
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:680
virtual IptcData & iptcData()
Returns an IptcData instance containing currently buffered IPTC data.
Definition image.cpp:536
virtual ExifData & exifData()
Returns an ExifData instance containing currently buffered Exif data.
Definition image.cpp:532
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:153
std::string mimeType() const override
Return the MIME type of the image.
Definition mrwimage.cpp:21
void setExifData(const ExifData &exifData) override
Todo: Not supported yet, requires writeMetadata(). Calling this function will throw an Error(ErrorCod...
Definition mrwimage.cpp:41
MrwImage(BasicIo::UniquePtr io, bool create)
Constructor that can either open an existing MRW image or create a new image from scratch....
Definition mrwimage.cpp:17
void writeMetadata() override
Todo: Write metadata back to the image. This method is not yet implemented. Calling it will throw an ...
Definition mrwimage.cpp:113
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition mrwimage.cpp:56
void setComment(const std::string &) override
Not supported. MRW format does not contain a comment. Calling this function will throw an Error(Error...
Definition mrwimage.cpp:51
uint32_t pixelWidth() const override
Return the pixel width of the image.
Definition mrwimage.cpp:25
void setIptcData(const IptcData &iptcData) override
Todo: Not supported yet, requires writeMetadata(). Calling this function will throw an Error(ErrorCod...
Definition mrwimage.cpp:46
uint32_t pixelHeight() const override
Return the pixel height of the image.
Definition mrwimage.cpp:33
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
EXIV2API bool isMrwType(BasicIo &iIo, bool advance)
Check if the file iIo is a MRW image.
Definition mrwimage.cpp:128
EXIV2API Image::UniquePtr newMrwInstance(BasicIo::UniquePtr io, bool create)
Create a new MrwImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition mrwimage.cpp:120