The PHP JPEG Metadata Toolkit - Documentation

Go to Documentation - Home

Photoshop IRB & IPTC-NAA IIM Function Reference

The Photoshop Image Resource Block (IRB) resides in the "App 13" segment of a JPEG image. It contains photoshop information but can also contain the IPTC-NAA IIM record. (International Press Telecommunications Council, Newspaper Association of America, Information Interchange Model)



Function: get_Photoshop_IRB
Description: Retrieves the Photoshop Information Resource Block (IRB) information from an App13 JPEG segment and returns it as an array. This may include IPTC-NAA IIM Information. Uses information supplied by the get_jpeg_header_data function
Parameters: jpeg_header_data a JPEG header data array in the same format as from get_jpeg_header_data
Returns: IRBdata The array of Photoshop IRB records
FALSE if an APP 13 Photoshop IRB segment could not be found, or if an error occured




Function: put_Photoshop_IRB
Description: Adds or modifies the Photoshop Information Resource Block (IRB) information from an App13 JPEG segment. If a Photoshop IRB already exists, it is replaced, otherwise a new one is inserted, using the supplied data. Uses information supplied by the get_jpeg_header_data function
Parameters: jpeg_header_data a JPEG header data array in the same format as from get_jpeg_header_data
new_IRB_data an array of the data to be stored in the Photoshop IRB segment. Should be in the same format as received from get_Photoshop_IRB
Returns: jpeg_header_data the JPEG header data array with the Photoshop IRB added.
FALSE if an error occured




Function: get_Photoshop_IPTC
Description: Retrieves IPTC-NAA IIM information from within a Photoshop IRB (if it is present) and returns it in an array. Uses information supplied by the get_jpeg_header_data function
Parameters: Photoshop_IRB_data an array of Photoshop IRB records, as returned from get_Photoshop_IRB
Returns: IPTC_Data_Out The array of IPTC-NAA IIM records
FALSE if an IPTC-NAA IIM record could not be found, or if an error occured




Function: put_Photoshop_IPTC
Description: Inserts a new IPTC-NAA IIM resource into a Photoshop IRB, or replaces an the existing resource if one is present. Uses information supplied by the get_Photoshop_IRB function
Parameters: Photoshop_IRB_data an array of Photoshop IRB records, as returned from get_Photoshop_IRB, into which the IPTC-NAA IIM record will be inserted
new_IPTC_block an array of IPTC-NAA records in the same format as those returned by get_Photoshop_IPTC
Returns: Photoshop_IRB_data The Photoshop IRB array with the IPTC-NAA IIM resource inserted




Function: Interpret_IRB_to_HTML
Description: Generates html showing the information contained in a Photoshop IRB data array, as retrieved with get_Photoshop_IRB, including any IPTC-NAA IIM records found.

Note: The following resource numbers are not currently decoded: ( Many of these do not apply to JPEG images)
0x03E9, 0x03EE, 0x03EF, 0x03F0, 0x03F1, 0x03F2, 0x03F6, 0x03F9, 0x03FA, 0x03FB, 0x03FD, 0x03FE, 0x0400, 0x0401, 0x0402, 0x0405, 0x040E, 0x040F, 0x0410, 0x0412, 0x0413, 0x0415, 0x0416, 0x0417, 0x041B, 0x041C, 0x041D, 0x0BB7

( Also these Obsolete resource numbers)
0x03E8, 0x03EB, 0x03FC, 0x03FF, 0x0403
Parameters: IRB_array a Photoshop IRB data array as from get_Photoshop_IRB
filename the name of the JPEG file being processed (used by the script which displays the Photoshop thumbnail)
Returns: output_str the HTML string


Function: Interpret_IPTC_to_HTML
Description: Generates html detailing the contents a IPTC-NAA IIM array which was retrieved with the get_Photoshop_IPTC function
Parameters: IPTC_info the IPTC-NAA IIM array,as read from get_IPTC
Returns: OutputStr A string containing the HTML