Loading...
Searching...
No Matches
photoshop.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef PHOTOSHOP_INT_HPP
#define PHOTOSHOP_INT_HPP
#include "exiv2lib_export.h"
#include "types.hpp"
#include <array>
namespace Exiv2 {
// Forward declarations
class IptcData;
struct EXIV2API Photoshop {
// Todo: Public for now
static constexpr std::array<const char*, 4> irbId_{"8BIM", "AgHg", "DCSR", "PHUT"};
static constexpr auto ps3Id_ = "Photoshop 3.0\0";
static constexpr uint16_t iptc_ = 0x0404;
static constexpr uint16_t preview_ = 0x040c;
static bool isIrb(const byte* pPsData);
static bool valid(const byte* pPsData, size_t sizePsData);
static int locateIrb(const byte* pPsData, size_t sizePsData, uint16_t psTag, const byte** record, uint32_t& sizeHdr,
uint32_t& sizeData);
static int locateIptcIrb(const byte* pPsData, size_t sizePsData, const byte** record, uint32_t& sizeHdr,
uint32_t& sizeData);
static int locatePreviewIrb(const byte* pPsData, size_t sizePsData, const byte** record, uint32_t& sizeHdr,
uint32_t& sizeData);
static DataBuf setIptcIrb(const byte* pPsData, size_t sizePsData, const IptcData& iptcData);
};
} // namespace Exiv2
#endif // PHOTOSHOP_INT_HPP
Exiv2::IptcData
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:153
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:124
Exiv2::Photoshop
Helper class, has methods to deal with Photoshop "Information Resource Blocks" (IRBs).
Definition photoshop.hpp:17
Exiv2::Photoshop::locateIrb
static int locateIrb(const byte *pPsData, size_t sizePsData, uint16_t psTag, const byte **record, uint32_t &sizeHdr, uint32_t &sizeData)
Locates the data for a Photoshop tag in a Photoshop formatted memory buffer. Operates on raw data to ...
Definition photoshop.cpp:34
Exiv2::Photoshop::isIrb
static bool isIrb(const byte *pPsData)
Checks an IRB.
Definition photoshop.cpp:11
Exiv2::Photoshop::ps3Id_
static constexpr auto ps3Id_
Photoshop marker
Definition photoshop.hpp:20
Exiv2::Photoshop::locateIptcIrb
static int locateIptcIrb(const byte *pPsData, size_t sizePsData, const byte **record, uint32_t &sizeHdr, uint32_t &sizeData)
Forwards to locateIrb() with psTag = iptc_.
Definition photoshop.cpp:105
Exiv2::Photoshop::locatePreviewIrb
static int locatePreviewIrb(const byte *pPsData, size_t sizePsData, const byte **record, uint32_t &sizeHdr, uint32_t &sizeData)
Forwards to locatePreviewIrb() with psTag = preview_.
Definition photoshop.cpp:110
Exiv2::Photoshop::setIptcIrb
static DataBuf setIptcIrb(const byte *pPsData, size_t sizePsData, const IptcData &iptcData)
Set the new IPTC IRB, keeps existing IRBs but removes the IPTC block if there is no new IPTC data to ...
Definition photoshop.cpp:115
Exiv2::Photoshop::preview_
static constexpr uint16_t preview_
Photoshop preview marker
Definition photoshop.hpp:22
Exiv2::Photoshop::valid
static bool valid(const byte *pPsData, size_t sizePsData)
Validates all IRBs.
Definition photoshop.cpp:18
Exiv2::Photoshop::iptc_
static constexpr uint16_t iptc_
Photoshop IPTC marker
Definition photoshop.hpp:21
Exiv2::Photoshop::irbId_
static constexpr std::array< const char *, 4 > irbId_
Photoshop IRB markers
Definition photoshop.hpp:19