Exiv2
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
13 namespace Exiv2 {
14 // *****************************************************************************
15 // class definitions
16 
21 class EXIV2API TgaImage : public Image {
22  public:
24 
25 
37  explicit TgaImage(BasicIo::UniquePtr io);
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.
82 EXIV2API Image::UniquePtr newTgaInstance(BasicIo::UniquePtr io, bool create);
83 
85 EXIV2API bool isTgaType(BasicIo& iIo, bool advance);
86 
87 } // namespace Exiv2
88 
89 #endif // #ifndef TGAIMAGE_HPP_
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition: image.hpp:53
An interface for simple binary IO.
Definition: basicio.hpp:35
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:373
Class to access raw TARGA images. This is just a stub - we only read width and height.
Definition: tgaimage.hpp:21
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:50
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition: iptc.hpp:153
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
List of TIFF compression to MIME type mappings.
Definition: tiffimage.cpp:47
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
EXIV2API bool isTgaType(BasicIo &iIo, bool advance)
Check if the file iIo is a Targa v2 image.
Definition: tgaimage.cpp:99