Exiv2
Loading...
Searching...
No Matches
psdimage.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#ifndef PSDIMAGE_HPP_
4#define PSDIMAGE_HPP_
5
6// *****************************************************************************
7#include "exiv2lib_export.h"
8
9// included header files
10#include "image.hpp"
11
12// *****************************************************************************
13// namespace extensions
14namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
21class EXIV2API PsdImage : public Image {
22 public:
24
25
37 explicit PsdImage(BasicIo::UniquePtr io);
39
41
42 void readMetadata() override;
43 void writeMetadata() override;
47 void setComment(const std::string&) override;
49
51
52
63 [[nodiscard]] std::string mimeType() const override;
65
66 private:
68
69 void readResourceBlock(uint16_t resourceId, uint32_t resourceSize);
77 void doWriteMetadata(BasicIo& outIo);
78 uint32_t writeExifData(ExifData& exifData, BasicIo& out);
80
82
83 static uint32_t writeIptcData(const IptcData& iptcData, BasicIo& out);
84 uint32_t writeXmpData(const XmpData& xmpData, BasicIo& out) const;
86
87}; // class PsdImage
88
89// *****************************************************************************
90// template, inline and free functions
91
92// These could be static private functions on Image subclasses but then
93// ImageFactory needs to be made a friend.
99EXIV2API Image::UniquePtr newPsdInstance(BasicIo::UniquePtr io, bool create);
100
102EXIV2API bool isPsdType(BasicIo& iIo, bool advance);
103
104} // namespace Exiv2
105
106#endif // #ifndef PSDIMAGE_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
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition image.hpp:50
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 to access raw Photoshop images.
Definition psdimage.hpp:21
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition xmp_exiv2.hpp:138
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
EXIV2API bool isPsdType(BasicIo &iIo, bool advance)
Check if the file iIo is a Photoshop image.
Definition psdimage.cpp:685
EXIV2API Image::UniquePtr newPsdInstance(BasicIo::UniquePtr io, bool create)
Create a new PsdImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition psdimage.cpp:677
List of TIFF compression to MIME type mappings.
Definition tiffimage.cpp:47