| 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
14 namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
21 class 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_
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::ExifData
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition exif.hpp:379
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::xmpData
virtual XmpData & xmpData()
Returns an XmpData instance containing currently buffered XMP data.
Definition image.cpp:540
Exiv2::Image::iptcData
virtual IptcData & iptcData()
Returns an IptcData instance containing currently buffered IPTC data.
Definition image.cpp:536
Exiv2::Image::exifData
virtual ExifData & exifData()
Returns an ExifData instance containing currently buffered Exif data.
Definition image.cpp:532
Exiv2::Image::UniquePtr
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
Exiv2::IptcData
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:153
Exiv2::PsdImage::setComment
void setComment(const std::string &) override
Not supported. Calling this function will throw an Error(ErrorCode::kerInvalidSettingForImage).
Definition psdimage.cpp:110
Exiv2::PsdImage::writeMetadata
void writeMetadata() override
Write metadata back to the image.
Definition psdimage.cpp:314
Exiv2::PsdImage::mimeType
std::string mimeType() const override
Return the MIME type of the image.
Definition psdimage.cpp:106
Exiv2::PsdImage::PsdImage
PsdImage(BasicIo::UniquePtr io)
Constructor to open a Photoshop image. Since the constructor can not return a result,...
Definition psdimage.cpp:103
Exiv2::PsdImage::readMetadata
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition psdimage.cpp:115
Exiv2::XmpData
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition xmp_exiv2.hpp:138
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::isPsdType
EXIV2API bool isPsdType(BasicIo &iIo, bool advance)
Check if the file iIo is a Photoshop image.
Definition psdimage.cpp:688
Exiv2::newPsdInstance
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:680