📄 photoshop_file_info.php
字号:
{ $outputarray = add_to_field( $outputarray, 'captionwriter' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Headline tag contains headline - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Headline" ); // Check that the Headline Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'headline' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Instructions tag contains instructions - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Instructions" ); // Check that the Instructions Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'instructions' , HTML_UTF8_Escape( $Item['value'] ), "\n" ); } /***************************************/ // The Photoshop AuthorsPosition tag contains authorsposition - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:AuthorsPosition" ); // Check that the AuthorsPosition Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'authorsposition' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Credit tag contains credit - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Credit" ); // Check that the Credit Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'credit' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Source tag contains source - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Source" ); // Check that the Credit Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'source' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop City tag contains city - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:City" ); // Check that the City Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'city' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop State tag contains state - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:State" ); // Check that the State Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'state' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Country tag contains country - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Country" ); // Check that the Country Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'country' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop TransmissionReference tag contains transmissionreference - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:TransmissionReference" ); // Check that the TransmissionReference Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'transmissionreference' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Category tag contains category - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Category" ); // Check that the TransmissionReference Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'category' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop DateCreated tag contains date - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:DateCreated" ); // Check that the DateCreated Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'date' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop Urgency tag contains urgency - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:Urgency" ); // Check that the Urgency Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'urgency' , HTML_UTF8_Escape( $Item['value'] ), "," ); } /***************************************/ // The Photoshop SupplementalCategories tag contains supplementalcategories - Find it $Item = find_XMP_item( $photoshop_block, "photoshop:SupplementalCategories" ); // Check that the SupplementalCategories Field exists if ( $Item != FALSE ) { // Check that the values exist if ( ( array_key_exists( 'children', $Item ) ) && ( $Item['children'][0]['tag'] =="rdf:Bag" ) ) { // Cycle through the values and save them foreach ( $Item['children'][0]['children'] as $sup_category ) { if ( ( array_key_exists( 'value', $sup_category ) ) && ( ! in_array ( HTML_UTF8_Escape( $sup_category['value'] ), $outputarray['supplementalcategories'])) ) { if ( array_key_exists( 'value', $sup_category ) ) { $outputarray['supplementalcategories'][] = HTML_UTF8_Escape( $sup_category['value'] ); } } } } } } /***************************************/ // Find the Job Reference Information within the XMP block $job_block = find_XMP_block( $XMP_array, "xapBJ" ); // Check that the Job Reference Information exists if ( $job_block != FALSE ) { // The JobRef Field contains jobname - Find it $Item = find_XMP_item( $job_block, "xapBJ:JobRef" ); // Check that the JobRef Field exists if ( $Item != FALSE ) { // Check that the value exists and save it if ( ( array_key_exists( 'children', $Item ) ) && ( $Item['children'][0]['tag'] =="rdf:Bag" ) && ( array_key_exists( 'children', $Item['children'][0] ) ) && ( $Item['children'][0]['children'][0]['tag'] =="rdf:li" ) && ( array_key_exists( 'children', $Item['children'][0]['children'][0] ) ) && ( $Item['children'][0]['children'][0]['children'][0]['tag'] =="stJob:name" ) && ( array_key_exists( 'value', $Item['children'][0]['children'][0]['children'][0] ) ) ) { $outputarray = add_to_field( $outputarray, 'jobname' , HTML_UTF8_Escape( $Item['children'][0]['children'][0]['children'][0]['value'] ), "," ); } } } /***************************************/ // Find the Rights Information within the XMP block $rights_block = find_XMP_block( $XMP_array, "xapRights" ); // Check that the Rights Information exists if ( $rights_block != FALSE ) { // The WebStatement Field contains ownerurl - Find it $Item = find_XMP_item( $rights_block, "xapRights:WebStatement" ); // Check that the WebStatement Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { $outputarray = add_to_field( $outputarray, 'ownerurl' , HTML_UTF8_Escape( $Item['value'] ), "\n" ); } /***************************************/ // The Marked Field contains copyrightstatus - Find it $Item = find_XMP_item( $rights_block, "xapRights:Marked" ); // Check that the Marked Field exists and save the value if ( ( $Item != FALSE ) && ( array_key_exists( 'value', $Item ) ) ) { if ( $Item['value'] == "True" ) { $outputarray = add_to_field( $outputarray, 'copyrightstatus' , "Copyrighted Work", "," ); } else { $outputarray = add_to_field( $outputarray, 'copyrightstatus' , "Public Domain", "," ); } } } /***************************************/ // Photoshop IRB Processing // Check that the Photoshop IRB exists if ( $IRB_array != FALSE ) { // Create a translation table to convert carriage returns to linefeeds $irbtrans = array("\x0d" => "\x0a"); // The Photoshop IRB Copyright flag (0x040A) contains copyrightstatus - find it $IRB_copyright_flag = find_Photoshop_IRB_Resource( $IRB_array, 0x040A ); // Check if the Copyright flag Field exists, and save the value if( $IRB_copyright_flag != FALSE ) { // Check the value of the copyright flag if ( hexdec( bin2hex( $IRB_copyright_flag['ResData'] ) ) == 1 ) { // Save the value $outputarray = add_to_field( $outputarray, 'copyrightstatus' , "Copyrighted Work", "," ); } else { // Do nothing - copyrightstatus will be set to unmarked if still blank at end } } /***************************************/ // The Photoshop IRB URL (0x040B) contains ownerurl - find it $IRB_url = find_Photoshop_IRB_Resource( $IRB_array, 0x040B );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -