6 #include "exiv2lib_export.h"
16 EXIV2API
bool enableBMFF(
bool enable =
true);
19 #ifdef EXV_ENABLE_BMFF
22 explicit Iloc(uint32_t ID = 0, uint32_t start = 0, uint32_t length = 0) : ID_(ID), start_(start), length_(length) {
24 virtual ~Iloc() =
default;
25 Iloc(
const Iloc&) =
default;
26 Iloc& operator=(
const Iloc&) =
default;
32 [[nodiscard]] std::string toString()
const;
41 class EXIV2API BmffImage :
public Image {
63 void parseTiff(uint32_t root_tag, uint64_t length);
71 void parseTiff(uint32_t root_tag, uint64_t length, uint64_t start);
81 void parseXmp(uint64_t length, uint64_t start);
97 void parseCr3Preview(
const DataBuf& data, std::ostream& out,
bool bTrace, uint8_t
version,
size_t width_offset,
98 size_t height_offset,
size_t size_offset,
size_t relative_position);
103 void readMetadata()
override;
104 void writeMetadata()
override;
105 void setExifData(
const ExifData&)
override;
106 void setIptcData(
const IptcData&)
override;
107 void setXmpData(
const XmpData&)
override;
108 void setComment(
const std::string&
comment)
override;
114 [[nodiscard]] std::string mimeType()
const override;
115 [[nodiscard]] uint32_t pixelWidth()
const override;
116 [[nodiscard]] uint32_t pixelHeight()
const override;
122 void openOrThrow()
const;
133 uint32_t fileType_{0};
134 std::set<size_t> visits_;
135 uint64_t visits_max_{0};
136 uint16_t unknownID_{0xffff};
137 uint16_t exifID_{0xffff};
139 std::map<uint32_t, Iloc> ilocs_;
140 bool bReadMetadata_{
false};
141 const size_t max_box_depth_;
147 static std::string toAscii(uint32_t n);
148 std::string boxName(uint32_t box);
149 static bool superBox(uint32_t box);
150 static bool fullBox(uint32_t box);
156 #ifdef EXV_HAVE_BROTLI
157 static void brotliUncompress(
const byte* compressedBuf,
size_t compressedBufSize, DataBuf& arr);
175 EXIV2API
bool isBmffType(BasicIo& iIo,
bool advance);
177 #endif // EXV_ENABLE_BMFF
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition: image.hpp:53
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:34
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:26
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:124
PrintStructureOption
Options for printStructure.
Definition: image.hpp:38
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition: basicio.hpp:38
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition: asfvideo.hpp:15
Exiv2 type for the Exif user comment.
Definition: types.hpp:90
EXIV2API const char * version()
Return the version of Exiv2 as "C" string eg "0.27.0.2".
Definition: version.cpp:79