![]() |
Exiv2
|
Helper class, has methods to deal with Photoshop "Information Resource Blocks" (IRBs). More...
#include <photoshop.hpp>
Static Public Member Functions | |
| static bool | isIrb (const byte *pPsData) |
| Checks an IRB. | |
| static bool | valid (const byte *pPsData, size_t sizePsData) |
| Validates all IRBs. | |
| 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 simplify reuse. | |
| static int | locateIptcIrb (const byte *pPsData, size_t sizePsData, const byte **record, uint32_t &sizeHdr, uint32_t &sizeData) |
| Forwards to locateIrb() with psTag = iptc_. | |
| static int | locatePreviewIrb (const byte *pPsData, size_t sizePsData, const byte **record, uint32_t &sizeHdr, uint32_t &sizeData) |
| Forwards to locatePreviewIrb() with psTag = preview_. | |
| 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 write. | |
Helper class, has methods to deal with Photoshop "Information Resource Blocks" (IRBs).
|
static |
Checks an IRB.
| pPsData | Existing IRB buffer. It is expected to be of size 4. |
References irbId_.
Referenced by locateIrb(), and Exiv2::PsdImage::readMetadata().
|
static |
Locates the data for a Photoshop tag in a Photoshop formatted memory buffer. Operates on raw data to simplify reuse.
| pPsData | Pointer to buffer containing entire payload of Photoshop formatted data (from APP13 Jpeg segment) |
| sizePsData | Size in bytes of pPsData. |
| psTag | Tag number of the block to look for. |
| record | Output value that is set to the start of the data block within pPsData (may not be null). |
| sizeHdr | Output value that is set to the size of the header within the data block pointed to by record (may not be null). |
| sizeData | Output value that is set to the size of the actual data within the data block pointed to by record (may not be null). |
References Exiv2::getULong(), Exiv2::getUShort(), and isIrb().
Referenced by locateIptcIrb(), and locatePreviewIrb().
|
static |
Set the new IPTC IRB, keeps existing IRBs but removes the IPTC block if there is no new IPTC data to write.
| pPsData | Existing IRB buffer |
| sizePsData | Size of the IRB buffer, may be 0 |
| iptcData | Iptc data to embed, may be empty |
References Exiv2::append(), Exiv2::DataBuf::c_data(), Exiv2::IptcParser::encode(), Exiv2::Internal::enforce(), Exiv2::hexdump(), iptc_, irbId_, locateIptcIrb(), Exiv2::ul2Data(), and Exiv2::us2Data().
|
static |
Validates all IRBs.
| pPsData | Existing IRB buffer |
| sizePsData | Size of the IRB buffer, may be 0 |
References locateIptcIrb().
Referenced by Exiv2::JpegBase::readMetadata().