Exiv2
Loading...
Searching...
No Matches
bmpimage.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
8#ifndef BMPIMAGE_HPP_
9#define BMPIMAGE_HPP_
10
11// *****************************************************************************
12#include "exiv2lib_export.h"
13
14// included header files
15#include "image.hpp"
16
17// *****************************************************************************
18// namespace extensions
19namespace Exiv2 {
20// *****************************************************************************
21// class definitions
22
27class EXIV2API BmpImage : public Image {
28 public:
30
31
45
47
48 void readMetadata() override;
49
51 void writeMetadata() override;
52
54 void setExifData(const ExifData& exifData) override;
55
57 void setIptcData(const IptcData& iptcData) override;
58
60 void setComment(const std::string&) override;
62
64
65 [[nodiscard]] std::string mimeType() const override;
67}; // class BmpImage
68
69// *****************************************************************************
70// template, inline and free functions
71
72// These could be static private functions on Image subclasses but then
73// ImageFactory needs to be made a friend.
79EXIV2API Image::UniquePtr newBmpInstance(BasicIo::UniquePtr io, bool create);
80
82EXIV2API bool isBmpType(BasicIo& iIo, bool advance);
83
84} // namespace Exiv2
85
86#endif // #ifndef BMPIMAGE_HPP_
An interface for simple binary IO.
Definition basicio.hpp:35
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
BmpImage(BasicIo::UniquePtr io)
Constructor to open a Windows bitmap image. Since the constructor can not return a result,...
Definition bmpimage.cpp:22
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition bmpimage.cpp:42
void writeMetadata() override
Definition bmpimage.cpp:85
void setExifData(const ExifData &exifData) override
Definition bmpimage.cpp:30
void setIptcData(const IptcData &iptcData) override
Definition bmpimage.cpp:34
void setComment(const std::string &) override
Definition bmpimage.cpp:38
std::string mimeType() const override
Return the MIME type of the image.
Definition bmpimage.cpp:25
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
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
EXIV2API bool isBmpType(BasicIo &iIo, bool advance)
Check if the file iIo is a Windows Bitmap image.
Definition bmpimage.cpp:100
EXIV2API Image::UniquePtr newBmpInstance(BasicIo::UniquePtr io, bool create)
Create a new BmpImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition bmpimage.cpp:92