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

📄 photoshop_irb.php

📁 CMS系统 提供学习研究修改最好了 比流行的一些CMS简单 但是更容易理解 是帮助你学习PHPCMS系统的好东东哦
💻 PHP
📖 第 1 页 / 共 5 页
字号:
                                        if ( $Qual_Info['Format'] == 0x0101 )                                        {                                                switch ( $Qual_Info['Scans'] )                                                {                                                        case 0x0001:                                                                $output_str .= "3 Scans\n";                                                                break;                                                        case 0x0002:                                                                $output_str .= "4 Scans\n";                                                                break;                                                        case 0x0003:                                                                $output_str .= "5 Scans\n";                                                                break;                                                        default:                                                                $output_str .= "Unknown number of scans (" . $Qual_Info['Scans'] .")\n";                                                                break;                                                }                                        }                                        $output_str .= "</td></tr>\n";                                        break;                                case 0x0409 : // Thumbnail Resource                                case 0x040C : // Thumbnail Resource                                        $thumb_data = unpack("NFormat/NWidth/NHeight/NWidthBytes/NSize/NCompressedSize/nBitsPixel/nPlanes", $IRB_Resource['ResData'] );                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= "Format = " . (( $thumb_data['Format'] == 1 ) ? "JPEG RGB\n" :  "Raw RGB\n");                                        $output_str .= "Width = " . $thumb_data['Width'] . "\n";                                        $output_str .= "Height = " . $thumb_data['Height'] . "\n";                                        $output_str .= "Padded Row Bytes = " . $thumb_data['WidthBytes'] . " bytes\n";                                        $output_str .= "Total Size = " . $thumb_data['Size'] . " bytes\n";                                        $output_str .= "Compressed Size = " . $thumb_data['CompressedSize'] . " bytes\n";                                        $output_str .= "Bits per Pixel = " . $thumb_data['BitsPixel'] . " bits\n";                                        $output_str .= "Number of planes = " . $thumb_data['Planes'] . " bytes\n";                                        // Change: as of version 1.11 - Changed to make thumbnail link portable across directories                                        // Build the path of the thumbnail script and its filename parameter to put in a url                                        $link_str = get_relative_path( dirname(__FILE__) . "/get_ps_thumb.php" , getcwd ( ) );                                        $link_str .= "?filename=";                                        $link_str .= get_relative_path( $filename, dirname(__FILE__) );                                        // Add thumbnail link to html                                        $output_str .= "Thumbnail Data:</pre><a class=\"Photoshop_Thumbnail_Link\" href=\"$link_str\"><img class=\"Photoshop_Thumbnail_Link\" src=\"$link_str\"></a>\n";                                        $output_str .=  "</td></tr>\n";                                        break;                                case 0x0414 : // Document Specific ID's                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>" . hexdec( bin2hex( $IRB_Resource['ResData'] ) ) . "</pre></td></tr>\n";                                        break;                                case 0x041E : // URL List                                        $URL_count = hexdec( bin2hex( substr( $IRB_Resource['ResData'], 0, 4 ) ) );                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\">\n";                                        $output_str .= "$URL_count URL's in list<br>\n";                                        $urlstr = substr( $IRB_Resource['ResData'], 4 );                                        // TODO: Check if URL List in Photoshop IRB works                                        for( $i = 0; $i < $URL_count; $i++ )                                        {                                                $url_data = unpack( "NLong/NID/NURLSize", $urlstr );                                                $output_str .= "URL $i info: long = " . $url_data['Long'] .", ";                                                $output_str .= "ID = " . $url_data['ID'] . ", ";                                                $urlstr = substr( $urlstr, 12 );                                                $url = substr( $urlstr, 0, $url_data['URLSize'] );                                                $output_str .= "URL = <a href=\"" . xml_UTF16_clean( $url, TRUE ) . "\">" . HTML_UTF16_Escape( $url, TRUE ) . "</a><br>\n";                                        }                                        $output_str .= "</td></tr>\n";                                        break;                                case 0x03F4 : // Grayscale and multichannel halftoning information.                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= Interpret_Halftone( $IRB_Resource['ResData'] );                                        $output_str .= "</pre></td></tr>\n";                                        break;                                case 0x03F5 : // Color halftoning information                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= "Cyan Halftoning Info:\n" . Interpret_Halftone( substr( $IRB_Resource['ResData'], 0, 18 ) ) . "\n\n";                                        $output_str .= "Magenta Halftoning Info:\n" . Interpret_Halftone( substr( $IRB_Resource['ResData'], 18, 18 ) ) . "\n\n";                                        $output_str .= "Yellow Halftoning Info:\n" . Interpret_Halftone( substr( $IRB_Resource['ResData'], 36, 18 ) ) . "\n";                                        $output_str .= "Black Halftoning Info:\n" . Interpret_Halftone( substr( $IRB_Resource['ResData'], 54, 18 ) ) . "\n";                                        $output_str .= "</pre></td></tr>\n";                                        break;                                case 0x03F7 : // Grayscale and multichannel transfer function.                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= Interpret_Transfer_Function( substr( $IRB_Resource['ResData'], 0, 28 ) ) ;                                        $output_str .= "</pre></td></tr>\n";                                        break;                                case 0x03F8 : // Color transfer functions                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= "Red Transfer Function:   \n" . Interpret_Transfer_Function( substr( $IRB_Resource['ResData'], 0, 28 ) ) . "\n\n";                                        $output_str .= "Green Transfer Function: \n" . Interpret_Transfer_Function( substr( $IRB_Resource['ResData'], 28, 28 ) ) . "\n\n";                                        $output_str .= "Blue Transfer Function:  \n" . Interpret_Transfer_Function( substr( $IRB_Resource['ResData'], 56, 28 ) ) . "\n";                                        $output_str .= "</pre></td></tr>\n";                                        break;                                case 0x03F3 : // Print Flags                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        if ( $IRB_Resource['ResData']{0} == "\x01" )                                        {                                                $output_str .= "Labels Selected\n";                                        }                                        else                                        {                                                $output_str .= "Labels Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{1} == "\x01" )                                        {                                                $output_str .= "Crop Marks Selected\n";                                        }                                        else                                        {                                                $output_str .= "Crop Marks Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{2} == "\x01" )                                        {                                                $output_str .= "Color Bars Selected\n";                                        }                                        else                                        {                                                $output_str .= "Color Bars Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{3} == "\x01" )                                        {                                                $output_str .= "Registration Marks Selected\n";                                        }                                        else                                        {                                                $output_str .= "Registration Marks Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{4} == "\x01" )                                        {                                                $output_str .= "Negative Selected\n";                                        }                                        else                                        {                                                $output_str .= "Negative Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{5} == "\x01" )                                        {                                                $output_str .= "Flip Selected\n";                                        }                                        else                                        {                                                $output_str .= "Flip Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{6} == "\x01" )                                        {                                                $output_str .= "Interpolate Selected\n";                                        }                                        else                                        {                                                $output_str .= "Interpolate Not Selected\n";                                        }                                        if ( $IRB_Resource['ResData']{7} == "\x01" )                                        {                                                $output_str .= "Caption Selected";                                        }                                        else                                        {                                                $output_str .= "Caption Not Selected";                                        }                                        $output_str .= "</pre></td></tr>\n";                                        break;                                case 0x2710 : // Print Flags Information                                        $PrintFlags = unpack( "nVersion/CCentCrop/Cjunk/NBleedWidth/nBleedWidthScale", $IRB_Resource['ResData'] );                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= "Version = " . $PrintFlags['Version'] . "\n";                                        $output_str .= "Centre Crop Marks = " . $PrintFlags['CentCrop'] . "\n";                                        $output_str .= "Bleed Width = " . $PrintFlags['BleedWidth'] . "\n";                                        $output_str .= "Bleed Width Scale = " . $PrintFlags['BleedWidthScale'];                                        $output_str .= "</pre></td></tr>\n";                                        break;                                case 0x03ED : // Resolution Info                                        $ResInfo = unpack( "nhRes_int/nhResdec/nhResUnit/nwidthUnit/nvRes_int/nvResdec/nvResUnit/nheightUnit", $IRB_Resource['ResData'] );                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>\n";                                        $output_str .= "Horizontal Resolution = " . ($ResInfo['hRes_int'] + $ResInfo['hResdec']/65536) . " pixels per Inch\n";                                        $output_str .= "Vertical Resolution = " . ($ResInfo['vRes_int'] + $ResInfo['vResdec']/65536) . " pixels per Inch\n";                                        if ( $ResInfo['hResUnit'] == 1 )                                        {                                                $output_str .= "Display units for Horizontal Resolution = Pixels per Inch\n";                                        }                                        elseif ( $ResInfo['hResUnit'] == 2 )                                        {                                                $output_str .= "Display units for Horizontal Resolution = Pixels per Centimetre\n";                                        }                                        else                                        {                                                $output_str .= "Display units for Horizontal Resolution = Unknown Value (". $ResInfo['hResUnit'] .")\n";                                        }                                        if ( $ResInfo['vResUnit'] == 1 )                                        {                                                $output_str .= "Display units for Vertical Resolution = Pixels per Inch\n";                                        }                                        elseif ( $ResInfo['vResUnit'] == 2 )                                        {                                                $output_str .= "Display units for Vertical Resolution = Pixels per Centimetre\n";                                        }                                        else                                        {                                                $output_str .= "Display units for Vertical Resolution = Unknown Value (". $ResInfo['vResUnit'] .")\n";                                        }                                        if ( $ResInfo['widthUnit'] == 1 )                                        {                                                $output_str .= "Display units for Image Width = Inches\n";                                        }                                        elseif ( $ResInfo['widthUnit'] == 2 )                                        {                                                $output_str .= "Display units for Image Width = Centimetres\n";                                        }                                        elseif ( $ResInfo['widthUnit'] == 3 )                                        {                                                $output_str .= "Display units for Image Width = Points\n";                                        }                                        elseif ( $ResInfo['widthUnit'] == 4 )                                        {                                                $output_str .= "Display units for Image Width = Picas\n";                                        }                                        elseif ( $ResInfo['widthUnit'] == 5 )                                        {                                                $output_str .= "Display units for Image Width = Columns\n";                                        }                                        else                                        {

⌨️ 快捷键说明

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