| Exiv2

Loading...
Searching...
No Matches
pngimage.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#ifndef PNGIMAGE_HPP_
4#define PNGIMAGE_HPP_
5
6// *****************************************************************************
7#include "exiv2lib_export.h"
8
9// included header files
10#include "image.hpp"
11
12// *****************************************************************************
13// namespace extensions
14 namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
22 class EXIV2API PngImage : public Image {
23 public:
25
26
41 PngImage(BasicIo::UniquePtr io, bool create);
43
45
46 void readMetadata() override;
47 void writeMetadata() override;
48
55 void printStructure(std::ostream& out, PrintStructureOption option, size_t depth) override;
57
59
60 [[nodiscard]] std::string mimeType() const override;
62
63 private:
71 void doWriteMetadata(BasicIo& outIo);
73
74 std::string profileName_;
75
76}; // class PngImage
77
78// *****************************************************************************
79// template, inline and free functions
80
81// These could be static private functions on Image subclasses but then
82// ImageFactory needs to be made a friend.
88EXIV2API Image::UniquePtr newPngInstance(BasicIo::UniquePtr io, bool create);
89
91EXIV2API bool isPngType(BasicIo& iIo, bool advance);
92
93} // namespace Exiv2
94
95#endif // #ifndef PNGIMAGE_HPP_
Exiv2::BasicIo
An interface for simple binary IO.
Definition basicio.hpp:35
Exiv2::BasicIo::UniquePtr
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
Exiv2::Image::Image
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
Exiv2::Image::io
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:696
Exiv2::Image::UniquePtr
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
Exiv2::PngImage::PngImage
PngImage(BasicIo::UniquePtr io, bool create)
Constructor that can either open an existing PNG image or create a new image from scratch....
Exiv2::PngImage::mimeType
std::string mimeType() const override
Return the MIME type of the image.
Exiv2::PngImage::writeMetadata
void writeMetadata() override
Write metadata back to the image.
Exiv2::PngImage::readMetadata
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Exiv2::PngImage::printStructure
void printStructure(std::ostream &out, PrintStructureOption option, size_t depth) override
Print out the structure of image file.
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::PrintStructureOption
PrintStructureOption
Options for printStructure.
Definition image.hpp:38
Exiv2::newPngInstance
EXIV2API Image::UniquePtr newPngInstance(BasicIo::UniquePtr io, bool create)
Create a new PngImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Exiv2::isPngType
EXIV2API bool isPngType(BasicIo &iIo, bool advance)
Check if the file iIo is a PNG image.