⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photoshop_file_info.php

📁 CMS系统 提供学习研究修改最好了 比流行的一些CMS简单 但是更容易理解 是帮助你学习PHPCMS系统的好东东哦
💻 PHP
📖 第 1 页 / 共 5 页
字号:
                        $firmware_str = $new_Exif_array[0][305]['Data'][0];                }        }        else        {                // No Software/Firmware string exists - create one                $firmware_str = $GLOBALS[ "Software Name" ];        }        // Update the EXIF Software/Firmware Tag with the new value        $new_Exif_array[0][305] = array(        "Tag Name"   => $GLOBALS[ "IFD_Tag_Definitions" ]['TIFF'][ 305 ]['Name'],                                                "Tag Number" => 305,                                                "Data Type"  => 2,                                                "Type"       => $GLOBALS[ "IFD_Tag_Definitions" ]['TIFF'][ 305 ]['Type'],                                                "Data"       => array( HTML_UTF8_Escape( $firmware_str ) ) );        /*******************************************/        // Photoshop IRB Processing        // Check if there is an existing Photoshop IRB array        if ($Old_IRB_array == FALSE )        {                // No existing IRB array - create one                $new_IRB_array = array();        }        else        {                // There is an existing Photoshop IRB array - use it                $new_IRB_array = $Old_IRB_array;        }        // Remove any existing Copyright Flag, URL, or IPTC resources - these will be re-written        foreach( $new_IRB_array as  $resno => $res )        {                if ( ( $res[ 'ResID' ] == 0x040A ) ||                     ( $res[ 'ResID' ] == 0x040B ) ||                     ( $res[ 'ResID' ] == 0x0404 ) )                {                        array_splice( $new_IRB_array, $resno, 1 );                }        }        // Add a new Copyright Flag resource        if ( $new_ps_file_info_array[ 'copyrightstatus' ] == "Copyrighted Work" )        {                $PS_copyright_flag = "\x01"; // Copyrighted        }        else        {                $PS_copyright_flag = "\x00"; // Public domain or Unmarked        }        $new_IRB_array[] = array(       'ResID' => 0x040A,                                        'ResName' => $GLOBALS[ "Photoshop_ID_Names" ][0x040A],                                        'ResDesc' => $GLOBALS[ "Photoshop_ID_Descriptions" ][0x040A],                                        'ResEmbeddedName' => "",                                        'ResData' => $PS_copyright_flag );        // Add a new URL resource        $new_IRB_array[] = array(       'ResID' => 0x040B,                                        'ResName' => $GLOBALS[ "Photoshop_ID_Names" ][0x040B],                                        'ResDesc' => $GLOBALS[ "Photoshop_ID_Descriptions" ][0x040B],                                        'ResEmbeddedName' => "",                                        'ResData' => $new_ps_file_info_array[ 'ownerurl' ] );        // Create IPTC resource        // IPTC requires date to be in the following format YYYYMMDD        $iptc_date = date( "Ymd", $date_stamp );        // Create the new IPTC array        $new_IPTC_array = array (                                  0 =>                                  array (                                    'IPTC_Type' => '2:00',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:00'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:00'],                                    'RecData' => "\x00\x02",                                  ),                                  1 =>                                  array (                                    'IPTC_Type' => '2:120',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:120'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:120'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'caption' ] ), 0 , 2000 ),                                  ),                                  2 =>                                  array (                                    'IPTC_Type' => '2:122',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:122'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:122'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'captionwriter' ] ), 0 , 32 ),                                  ),                                  3 =>                                  array (                                    'IPTC_Type' => '2:105',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:105'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:105'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'headline' ] ), 0 , 256 ),                                  ),                                  4 =>                                  array (                                    'IPTC_Type' => '2:40',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:40'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:40'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'instructions' ] ), 0, 256 ),                                  ),                                  5 =>                                  array (                                    'IPTC_Type' => '2:80',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:80'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:80'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'author' ] ), 0, 32 ),                                  ),                                  6 =>                                  array (                                    'IPTC_Type' => '2:85',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:85'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:85'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'authorsposition' ] ), 0, 32 ),                                  ),                                  7 =>                                  array (                                    'IPTC_Type' => '2:110',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:110'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:110'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'credit' ] ), 0, 32 ),                                  ),                                  8 =>                                  array (                                    'IPTC_Type' => '2:115',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:115'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:115'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'source' ] ), 0, 32 ),                                  ),                                  9 =>                                  array (                                    'IPTC_Type' => '2:05',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:05'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:05'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'title' ] ), 0, 64 ),                                  ),                                  10 =>                                  array (                                    'IPTC_Type' => '2:55',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:55'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:55'],                                    'RecData' => "$iptc_date",                                  ),                                  11 =>                                  array (                                    'IPTC_Type' => '2:90',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:90'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:90'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'city' ] ), 0, 32 ),                                  ),                                  12 =>                                  array (                                    'IPTC_Type' => '2:95',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:95'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:95'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'state' ] ), 0, 32 ),                                  ),                                  13 =>                                  array (                                    'IPTC_Type' => '2:101',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:101'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:101'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'country' ] ), 0, 64 ),                                  ),                                  14 =>                                  array (                                    'IPTC_Type' => '2:103',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:103'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:103'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'transmissionreference' ] ), 0, 32 ),                                  ),                                  15 =>                                  array (                                    'IPTC_Type' => '2:15',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:15'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:15'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'category' ] ), 0, 3 ),                                  ),                                  21 =>                                  array (                                    'IPTC_Type' => '2:116',                                    'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:10'],                                    'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:10'],                                    'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'copyrightnotice' ] ), 0, 128 ),                                  ),                                );        // Check the value of urgency is valid        if ( ( $new_ps_file_info_array[ 'urgency' ] > 0 ) && ( $new_ps_file_info_array[ 'urgency' ] < 9 ) )        {                // Add the Urgency item to the IPTC array                $new_IPTC_array[] = array (                                                'IPTC_Type' => '2:10',                                                'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:10'],                                                'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:10'],                                                'RecData' => substr( HTML_UTF8_Escape( $new_ps_file_info_array[ 'urgency' ] ), 0, 1 ),                                          );        }        // Cycle through the Supplemental Categories,        foreach( $new_ps_file_info_array[ 'supplementalcategories' ] as $supcat )        {                // Add this Supplemental Category to the IPTC array                $new_IPTC_array[] = array (                                            'IPTC_Type' => '2:20',                                            'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:20'],                                            'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:20'],                                            'RecData' => HTML_UTF8_Escape( $supcat ),                                          );        }        // Cycle through the Keywords,        foreach( $new_ps_file_info_array[ 'keywords' ] as $keyword )        {                // Add this Keyword to the IPTC array                $new_IPTC_array[] = array (                                            'IPTC_Type' => '2:25',                                            'RecName' => $GLOBALS[ "IPTC_Entry_Names" ]['2:25'],                                            'RecDesc' => $GLOBALS[ "IPTC_Entry_Descriptions" ]['2:25'],                                            'RecData' => $keyword,                                          );        }        /***********************************/        // XMP Processing        // Check if XMP existed previously        if ($Old_XMP_array == FALSE )        {                // XMP didn't exist - create a new one based on a blank structure                $new_XMP_array = XMP_Check( $GLOBALS[ 'Blank XMP Structure' ], array( ) );        }        else        {                // XMP does exist                // Some old XMP processors used x:xapmeta, check for this                if ( $Old_XMP_array[0]['tag'] == 'x:xapmeta' )                {                        // x:xapmeta found - change it to x:xmpmeta                        $Old_XMP_array[0]['tag'] = 'x:xmpmeta';                }                // Ensure that the existing XMP has all required fields, and add any that are missing                $new_XMP_array = XMP_Check( $GLOBALS[ 'Blank XMP Structure' ], $Old_XMP_array );        }        // Pro

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -