Exiv2
Loading...
Searching...
No Matches
tgaimage.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef TGAIMAGE_HPP_
3#define TGAIMAGE_HPP_
4
5// *****************************************************************************
6#include "exiv2lib_export.h"
7
8// included header files
9#include "image.hpp"
10
11// *****************************************************************************
12// namespace extensions
13namespace Exiv2 {
14// *****************************************************************************
15// class definitions
16
21class EXIV2API TgaImage : public Image {
22 public:
24
25
39
41
42 void readMetadata() override;
47 void writeMetadata() override;
52 void setExifData(const ExifData& exifData) override;
57 void setIptcData(const IptcData& iptcData) override;
62 void setComment(const std::string&) override;
64
66
67 [[nodiscard]] std::string mimeType() const override;
69
70}; // class TgaImage
71
72// *****************************************************************************
73// template, inline and free functions
74
75// These could be static private functions on Image subclasses but then
76// ImageFactory needs to be made a friend.
82EXIV2API Image::UniquePtr newTgaInstance(BasicIo::UniquePtr io, bool create);
83
85EXIV2API bool isTgaType(BasicIo& iIo, bool advance);
86
87} // namespace Exiv2
88
89#endif // #ifndef TGAIMAGE_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
void writeMetadata() override
Todo: Write metadata back to the image. This method is not yet(?) implemented. Calling it will throw ...
Definition tgaimage.cpp:84
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition tgaimage.cpp:39
void setComment(const std::string &) override
Not supported. Calling this function will throw an instance of Error(ErrorCode::kerInvalidSettingForI...
Definition tgaimage.cpp:34
TgaImage(BasicIo::UniquePtr io)
Constructor to open a Targa image. Since the constructor can not return a result, callers should chec...
Definition tgaimage.cpp:17
std::string mimeType() const override
Return the MIME type of the image.
Definition tgaimage.cpp:20
void setIptcData(const IptcData &iptcData) override
Todo: Not supported yet(?). Calling this function will throw an instance of Error(ErrorCode::kerInval...
Definition tgaimage.cpp:29
void setExifData(const ExifData &exifData) override
Todo: Not supported yet(?). Calling this function will throw an instance of Error(ErrorCode::kerInval...
Definition tgaimage.cpp:24
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
EXIV2API Image::UniquePtr newTgaInstance(BasicIo::UniquePtr io, bool create)
Create a new TgaImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition tgaimage.cpp:91
EXIV2API bool isTgaType(BasicIo &iIo, bool advance)
Check if the file iIo is a Targa v2 image.
Definition tgaimage.cpp:99