7#include "exiv2lib_export.h"
54 [[nodiscard]] std::string
mimeType()
const override;
58 void doWriteMetadata(
BasicIo& outIo);
61 static size_t getHeaderOffset(
const byte* data,
size_t data_size,
const byte* header,
size_t header_size);
63 static bool equalsWebPTag(
const Exiv2::DataBuf& buf,
const char* str);
64 void debugPrintHex(
byte* data,
size_t size);
65 void decodeChunks(uint32_t filesize);
66 void inject_VP8X(
BasicIo& iIo,
bool has_xmp,
bool has_exif,
bool has_alpha,
bool has_icc, uint32_t width,
67 uint32_t height)
const;
69 static constexpr byte WEBP_PAD_ODD = 0;
70 static constexpr int WEBP_TAG_SIZE = 0x4;
72 static constexpr int WEBP_VP8X_ICC_BIT = 0x20;
73 static constexpr int WEBP_VP8X_ALPHA_BIT = 0x10;
74 static constexpr int WEBP_VP8X_EXIF_BIT = 0x8;
75 static constexpr int WEBP_VP8X_XMP_BIT = 0x4;
77 static constexpr auto WEBP_CHUNK_HEADER_VP8X =
"VP8X";
78 static constexpr auto WEBP_CHUNK_HEADER_VP8L =
"VP8L";
79 static constexpr auto WEBP_CHUNK_HEADER_VP8 =
"VP8 ";
80 static constexpr auto WEBP_CHUNK_HEADER_ANMF =
"ANMF";
81 static constexpr auto WEBP_CHUNK_HEADER_ANIM =
"ANIM";
82 static constexpr auto WEBP_CHUNK_HEADER_ICCP =
"ICCP";
83 static constexpr auto WEBP_CHUNK_HEADER_EXIF =
"EXIF";
84 static constexpr auto WEBP_CHUNK_HEADER_XMP =
"XMP ";
An interface for simple binary IO.
Definition basicio.hpp:35
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
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
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
void setComment(const std::string &) override
Not supported. Calling this function will throw an Error(ErrorCode::kerInvalidSettingForImage).
Definition webpimage.cpp:86
std::string mimeType() const override
Return the MIME type of the image.
Definition webpimage.cpp:76
void writeMetadata() override
Write metadata back to the image.
Definition webpimage.cpp:93
void printStructure(std::ostream &out, PrintStructureOption option, size_t depth) override
Print out the structure of image file.
Definition webpimage.cpp:401
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition webpimage.cpp:461
WebPImage(BasicIo::UniquePtr io)
Constructor for a WebP video. Since the constructor can not return a result, callers should check the...
Definition webpimage.cpp:73
void setIptcData(const IptcData &) override
Assign new IPTC data. The new IPTC data is not written to the image until the writeMetadata() method ...
Definition webpimage.cpp:80
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
PrintStructureOption
Options for printStructure.
Definition image.hpp:38
EXIV2API bool isWebPType(BasicIo &iIo, bool advance)
Check if the file iIo is a WebP Video.
Definition webpimage.cpp:688
EXIV2API Image::UniquePtr newWebPInstance(BasicIo::UniquePtr io, bool create)
Create a new WebPImage instance and return an auto-pointer to it. Caller owns the returned object and...
Definition webpimage.cpp:680
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:124