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

📄 photoshop_irb.php

📁 CMS系统 提供学习研究修改最好了 比流行的一些CMS简单 但是更容易理解 是帮助你学习PHPCMS系统的好东东哦
💻 PHP
📖 第 1 页 / 共 5 页
字号:
                                                $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>Image is Copyrighted Material</pre></td></tr>\n";                                        }                                        else                                        {                                                $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>Image is Not Copyrighted Material</pre></td></tr>\n";                                        }                                        break;                                case 0x040D : // Global Lighting Angle                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>Global lighting angle for effects layer = " . hexdec( bin2hex( $IRB_Resource['ResData'] ) ) . " degrees</pre></td></tr>\n";                                        break;                                case 0x0419 : // Global Altitude                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>Global Altitude = " . hexdec( bin2hex( $IRB_Resource['ResData'] ) ) . "</pre></td></tr>\n";                                        break;                                case 0x0421 : // Version Info                                        $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 = " . hexdec( bin2hex( substr( $IRB_Resource['ResData'], 0, 4 ) ) ) . "\n";                                        $output_str .= "Has Real Merged Data = " . ord( $IRB_Resource['ResData']{4} ) . "\n";                                        $writer_size = hexdec( bin2hex( substr( $IRB_Resource['ResData'], 5, 4 ) ) ) * 2;                                        $output_str .= "Writer Name = " . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], 9, $writer_size ), TRUE ) . "\n";                                        $reader_size = hexdec( bin2hex( substr( $IRB_Resource['ResData'], 9 + $writer_size , 4 ) ) ) * 2;                                        $output_str .= "Reader Name = " . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], 13 + $writer_size, $reader_size ), TRUE ) . "\n";                                        $output_str .= "File Version = " . hexdec( bin2hex( substr( $IRB_Resource['ResData'], 13 + $writer_size + $reader_size, 4 ) ) ) . "\n";                                        $output_str .=  "</pre></td></tr>\n";                                        break;                                case 0x0411 : // ICC Untagged                                        if ( $IRB_Resource['ResData'] == "\x01" )                                        {                                                $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>Intentionally untagged - any assumed ICC profile handling disabled</pre></td></tr>\n";                                        }                                        else                                        {                                                $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\"><pre>Unknown value (0x" .bin2hex( $IRB_Resource['ResData'] ). ")</pre></td></tr>\n";                                        }                                        break;                                case 0x041A : // Slices                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\">";                                        // Unpack the first 24 bytes                                        $Slices_Info = unpack("NVersion/NBound_top/NBound_left/NBound_bottom/NBound_right/NStringlen", $IRB_Resource['ResData'] );                                        $output_str .= "Version = " . $Slices_Info['Version'] . "<br>\n";                                        $output_str .= "Bounding Rectangle =  Top:" . $Slices_Info['Bound_top'] . ", Left:" . $Slices_Info['Bound_left'] . ", Bottom:" . $Slices_Info['Bound_bottom'] . ", Right:" . $Slices_Info['Bound_right'] . " (Pixels)<br>\n";                                        $Slicepos = 24;                                        // Extract a Unicode String                                        $output_str .= "Text = '" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], 24, $Slices_Info['Stringlen']*2), TRUE ) . "'<br>\n";                                        $Slicepos += $Slices_Info['Stringlen'] * 2;                                        // Unpack the number of Slices                                        $Num_Slices = hexdec( bin2hex( substr( $IRB_Resource['ResData'], $Slicepos, 4 ) ) );                                        $output_str .= "Number of Slices = " . $Num_Slices . "\n";                                        $Slicepos += 4;                                        // Cycle through the slices                                        for( $i = 1; $i <= $Num_Slices; $i++ )                                        {                                                $output_str .= "<br><br>Slice $i:<br>\n";                                                // Unpack the first 16 bytes of the slice                                                $SliceA = unpack("NID/NGroupID/NOrigin/NStringlen", substr($IRB_Resource['ResData'], $Slicepos ) );                                                $Slicepos += 16;                                                $output_str .= "ID = " . $SliceA['ID'] . "<br>\n";                                                $output_str .= "Group ID = " . $SliceA['GroupID'] . "<br>\n";                                                $output_str .= "Origin = " . $SliceA['Origin'] . "<br>\n";                                                // Extract a Unicode String                                                $output_str .= "Text = '" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], $Slicepos, $SliceA['Stringlen']*2), TRUE ) . "'<br>\n";                                                $Slicepos += $SliceA['Stringlen'] * 2;                                                // Unpack the next 24 bytes of the slice                                                $SliceB = unpack("NType/NLeftPos/NTopPos/NRightPos/NBottomPos/NURLlen", substr($IRB_Resource['ResData'], $Slicepos )  );                                                $Slicepos += 24;                                                $output_str .= "Type = " . $SliceB['Type'] . "<br>\n";                                                $output_str .= "Position =  Top:" . $SliceB['TopPos'] . ", Left:" . $SliceB['LeftPos'] . ", Bottom:" . $SliceB['BottomPos'] . ", Right:" . $SliceB['RightPos'] . " (Pixels)<br>\n";                                                // Extract a Unicode String                                                $output_str .= "URL = <a href='" . substr( $IRB_Resource['ResData'], $Slicepos, $SliceB['URLlen']*2) . "'>" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], $Slicepos, $SliceB['URLlen']*2), TRUE ) . "</a><br>\n";                                                $Slicepos += $SliceB['URLlen'] * 2;                                                // Unpack the length of a Unicode String                                                $Targetlen = hexdec( bin2hex( substr( $IRB_Resource['ResData'], $Slicepos, 4 ) ) );                                                $Slicepos += 4;                                                // Extract a Unicode String                                                $output_str .= "Target = '" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], $Slicepos, $Targetlen*2), TRUE ) . "'<br>\n";                                                $Slicepos += $Targetlen * 2;                                                // Unpack the length of a Unicode String                                                $Messagelen = hexdec( bin2hex( substr( $IRB_Resource['ResData'], $Slicepos, 4 ) ) );                                                $Slicepos += 4;                                                // Extract a Unicode String                                                $output_str .= "Message = '" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], $Slicepos, $Messagelen*2), TRUE ) . "'<br>\n";                                                $Slicepos += $Messagelen * 2;                                                // Unpack the length of a Unicode String                                                $AltTaglen = hexdec( bin2hex( substr( $IRB_Resource['ResData'], $Slicepos, 4 ) ) );                                                $Slicepos += 4;                                                // Extract a Unicode String                                                $output_str .= "Alt Tag = '" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], $Slicepos, $AltTaglen*2), TRUE ) . "'<br>\n";                                                $Slicepos += $AltTaglen * 2;                                                // Unpack the HTML flag                                                if ( ord( $IRB_Resource['ResData']{ $Slicepos } ) === 0x01 )                                                {                                                        $output_str .= "Cell Text is HTML<br>\n";                                                }                                                else                                                {                                                        $output_str .= "Cell Text is NOT HTML<br>\n";                                                }                                                $Slicepos++;                                                // Unpack the length of a Unicode String                                                $CellTextlen = hexdec( bin2hex( substr( $IRB_Resource['ResData'], $Slicepos, 4 ) ) );                                                $Slicepos += 4;                                                // Extract a Unicode String                                                $output_str .= "Cell Text = '" . HTML_UTF16_Escape( substr( $IRB_Resource['ResData'], $Slicepos, $CellTextlen*2), TRUE ) . "'<br>\n";                                                $Slicepos += $CellTextlen * 2;                                                // Unpack the last 12 bytes of the slice                                                $SliceC = unpack("NAlignH/NAlignV/CAlpha/CRed/CGreen/CBlue", substr($IRB_Resource['ResData'], $Slicepos )  );                                                $Slicepos += 12;                                                $output_str .= "Alignment =  Horizontal:" . $SliceC['AlignH'] . ", Vertical:" . $SliceC['AlignV'] . "<br>\n";                                                $output_str .= "Alpha Colour = " . $SliceC['Alpha'] . "<br>\n";                                                $output_str .= "Red = " . $SliceC['Red'] . "<br>\n";                                                $output_str .= "Green = " . $SliceC['Green'] . "<br>\n";                                                $output_str .= "Blue = " . $SliceC['Blue'] . "\n";                                        }                                        $output_str .= "</td></tr>\n";                                        break;                                case 0x0408 : // Grid and Guides information                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\">";                                        // Unpack the Grids info                                        $Grid_Info = unpack("NVersion/NGridCycleH/NGridCycleV/NGuideCount", $IRB_Resource['ResData'] );                                        $output_str .= "Version = " . $Grid_Info['Version'] . "<br>\n";                                        $output_str .= "Grid Cycle = " . $Grid_Info['GridCycleH']/32 . " Pixel(s)  x  " . $Grid_Info['GridCycleV']/32 . " Pixel(s)<br>\n";                                        $output_str .= "Number of Guides = " . $Grid_Info['GuideCount'] . "\n";                                        // Cycle through the Guides                                        for( $i = 0; $i < $Grid_Info['GuideCount']; $i++ )                                        {                                                // Unpack the info for this guide                                                $Guide_Info = unpack("NLocation/CDirection", substr($IRB_Resource['ResData'],16+$i*5,5) );                                                $output_str .= "<br>Guide $i : Location = " . $Guide_Info['Location']/32 . " Pixel(s) from edge";                                                if ( $Guide_Info['Direction'] === 0 )                                                {                                                        $output_str .= ", Vertical\n";                                                }                                                else                                                {                                                        $output_str .= ", Horizontal\n";                                                }                                        }                                        break;                                        $output_str .= "</td></tr>\n";                                case 0x0406 : // JPEG Quality                                        $Qual_Info = unpack("nQuality/nFormat/nScans/Cconst", $IRB_Resource['ResData'] );                                        $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">$Resource_Name</td><td class=\"Photoshop_Value_Cell\">";                                        switch ( $Qual_Info['Quality'] )                                        {                                                case 0xFFFD:                                                        $output_str .= "Quality 1 (Low)<br>\n";                                                        break;                                                case 0xFFFE:                                                        $output_str .= "Quality 2 (Low)<br>\n";                                                        break;                                                case 0xFFFF:                                                        $output_str .= "Quality 3 (Low)<br>\n";                                                        break;                                                case 0x0000:                                                        $output_str .= "Quality 4 (Low)<br>\n";                                                        break;                                                case 0x0001:                                                        $output_str .= "Quality 5 (Medium)<br>\n";                                                        break;                                                case 0x0002:                                                        $output_str .= "Quality 6 (Medium)<br>\n";                                                        break;                                                case 0x0003:                                                        $output_str .= "Quality 7 (Medium)<br>\n";                                                        break;                                                case 0x0004:                                                        $output_str .= "Quality 8 (High)<br>\n";                                                        break;                                                case 0x0005:                                                        $output_str .= "Quality 9 (High)<br>\n";                                                        break;                                                case 0x0006:                                                        $output_str .= "Quality 10 (Maximum)<br>\n";                                                        break;                                                case 0x0007:                                                        $output_str .= "Quality 11 (Maximum)<br>\n";                                                        break;                                                case 0x0008:                                                        $output_str .= "Quality 12 (Maximum)<br>\n";                                                        break;                                                default:                                                        $output_str .= "Unknown Quality (" . $Qual_Info['Quality'] . ")<br>\n";                                                        break;                                        }                                        switch ( $Qual_Info['Format'] )                                        {                                                case 0x0000:                                                        $output_str .= "Standard Format\n";                                                        break;                                                case 0x0001:                                                        $output_str .= "Optimised Format\n";                                                        break;                                                case 0x0101:                                                        $output_str .= "Progressive Format<br>\n";                                                        break;                                                default:                                                        $output_str .= "Unknown Format (" . $Qual_Info['Format'] .")\n";                                                        break;                                        }

⌨️ 快捷键说明

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