Exiv2
photoshop.hpp
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #ifndef PHOTOSHOP_INT_HPP
4 #define PHOTOSHOP_INT_HPP
5 
6 #include "exiv2lib_export.h"
7 
8 #include "types.hpp"
9 
10 #include <array>
11 
12 namespace Exiv2 {
13 // Forward declarations
14 class IptcData;
15 
17 struct EXIV2API Photoshop {
18  // Todo: Public for now
19  static constexpr std::array<const char*, 4> irbId_{"8BIM", "AgHg", "DCSR", "PHUT"};
20  static constexpr auto ps3Id_ = "Photoshop 3.0\0";
21  static constexpr uint16_t iptc_ = 0x0404;
22  static constexpr uint16_t preview_ = 0x040c;
23 
29  static bool isIrb(const byte* pPsData);
30 
35  static bool valid(const byte* pPsData, size_t sizePsData);
36 
50  static int locateIrb(const byte* pPsData, size_t sizePsData, uint16_t psTag, const byte** record, uint32_t& sizeHdr,
51  uint32_t& sizeData);
52 
54  static int locateIptcIrb(const byte* pPsData, size_t sizePsData, const byte** record, uint32_t& sizeHdr,
55  uint32_t& sizeData);
56 
58  static int locatePreviewIrb(const byte* pPsData, size_t sizePsData, const byte** record, uint32_t& sizeHdr,
59  uint32_t& sizeData);
60 
66  static DataBuf setIptcIrb(const byte* pPsData, size_t sizePsData, const IptcData& iptcData);
67 };
68 } // namespace Exiv2
69 
70 #endif // PHOTOSHOP_INT_HPP
Helper class, has methods to deal with Photoshop "Information Resource Blocks" (IRBs).
Definition: photoshop.hpp:17
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:26
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:124
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition: iptc.hpp:153
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition: asfvideo.hpp:15