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

📄 canon.php

📁 CMS系统 提供学习研究修改最好了 比流行的一些CMS简单 但是更容易理解 是帮助你学习PHPCMS系统的好东东哦
💻 PHP
📖 第 1 页 / 共 3 页
字号:
                                        {
                                                if ( array_key_exists( $value, $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset] ) )
                                                {
                                                        $output_str .= $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset]['Name'] . ": " . $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset][$value] . "\n";
                                                }
                                                else
                                                {
                                                        if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE )
                                                        {
                                                                $output_str .= $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset]['Name'] . ": Unknown Value ($value)\n";
                                                        }
                                                }
                                        }
                                        else
                                        {
                                                if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE )
                                                {
                                                        // Unknown Canon camera setting
                                                        $output_str .= "        Unknown Setting ($offset), value: $value\n";
                                                }
                                        }
                                }

                        }
                        // Return the text string
                        return $output_str;
                        break;


                // CAMERA SETTINGS 2
                case 4:
                        // Create an output string
                        $output_str = "";

                        // Cycle through each of the camera settings Values
                        foreach( $Exif_Tag['Data'] as $offset => $value )
                        {
                                // Check that the value exists
                                if ( $value !== NULL )
                                {
                                        // Process the settings according to their offset
                                        if ( $offset == 0 )
                                        {
                                                // Do Not Show this Field ( Number of Bytes in Tag )
                                        }
                                        else if ( $offset == 9 )
                                        {
                                                $output_str .= "Sequence Number in a continuous burst : $value\n";
                                        }
                                        else if ( $offset == 14 )
                                        {
                                                $output_str .= "Number of Focus Points Available: ". ( ( $value & 0xF000 ) / 0x1000 ) . "\n";

                                                if ( $value & 0x0004 == 0x0004 )
                                                {
                                                        $output_str .= "Left Focus Point Used\n";
                                                }
                                                if ( $value & 0x0002 == 0x0002 )
                                                {
                                                        $output_str .= "Centre Focus Point Used\n";
                                                }
                                                if ( $value & 0x0001 == 0x0001 )
                                                {
                                                        $output_str .= "Right Focus Point Used\n";
                                                }
                                        }
                                        else if ( $offset == 19 )
                                        {
                                                $output_str .= "Subject distance: $value (units either mm or cm)\n";
                                        }
                                        else if ( array_key_exists( $offset, $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ] ) )
                                        {
                                                if ( array_key_exists( $value, $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset] ) )
                                                {
                                                        $output_str .= $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset]['Name'] . ": " . $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset][$value] . "\n";
                                                }
                                                else
                                                {
                                                        if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE )
                                                        {
                                                                $output_str .= $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset]['Name'] . ": Unknown Value ($value)\n";
                                                        }
                                                }
                                        }
                                        else
                                        {
                                                if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE )
                                                {
                                                        $output_str .= "        Unknown Setting ($offset), value: $value\n";
                                                }
                                        }
                                }

                        }
                        // Return the text string
                        return $output_str;
                        break;
                        
                        
                // Serial Number
                case 12:
                        $output_str =  sprintf ( "%04X%05d", (($Exif_Tag['Data'][0] & 0xFF00)/256), ($Exif_Tag['Data'][0] & 0x00FF) );
                        break;


                // Custom Functions
                case 15:
                        // Create an output string
                        $output_str = "";

                        // The size element is the first of the value array
                        // get rid of it
                        $tmparray = $Exif_Tag['Data'];
                        array_shift ( $tmparray );

                        // Cycle through each of the custom functions
                        foreach( $tmparray as $valorder => $value )
                        {
                                // Figure out the function number and value
                                $funcno = ( $value & 0xFF00 ) / 256;
                                $funcval = $value & 0x00FF;

                                // Check if the function exists in the lookup table of custom functions
                                if ( array_key_exists( $funcno, $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ] ) )
                                {
                                        // Function Exists in lookup table,
                                        // Check if value exists for this function in the lookup table
                                        if ( array_key_exists( $funcval, $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno] ) )
                                        {
                                                // Value exists - Add it to the output text
                                                $output_str .= $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno]['Name'] . ": " . $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno][$funcval] . "\n";
                                        }
                                        else
                                        {
                                                if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE )
                                                {
                                                        // Value doesn't exist - Add a message to the output text
                                                        $output_str .= $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno]['Name'] . ": Unknown Value ($value)\n";
                                                }
                                        }
                                }
                                else
                                {
                                        if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE )
                                        {
                                                // Function doesn't exist in lookup table - add a message to the output text
                                                $output_str .= "Unknown Custom Function ($funcno), value: $funcval\n";
                                        }
                                }
                        }
                        // Return the resulting string
                        return $output_str;
                        break;

                default :
                        return FALSE;
        }
        
        return FALSE;
}

/******************************************************************************
* End of Function:     get_Canon_Text_Value
******************************************************************************/
















/******************************************************************************
* Global Variable:      IFD_Tag_Definitions, Canon
*
* Contents:     This global variable provides definitions of the known Canon
*               Makernote tags, indexed by their tag number.
*
******************************************************************************/

$GLOBALS[ "IFD_Tag_Definitions" ]['Canon'] = array(

1 => array(     'Name' => "Camera Settings 1",
                'Type' => "Special" ),

4 => array(     'Name' => "Camera Settings 2",
                'Type' => "Special" ),

6 => array(     'Name' => "Image Type",
                'Type' => "String" ),

7 => array(     'Name' => "Firmware Version",
                'Type' => "String" ),

8 => array(     'Name' => "Image Number",
                'Type' => "Numeric" ),

9 => array(     'Name' => "Owner Name",
                'Type' => "String" ),

12 => array(    'Name' => "Camera Serial Number",
                'Type' => "Special" ),

15 => array(    'Name' => "Custom Functions",
                'Type' => "Special" )

);


/******************************************************************************
* End of Global Variable:     IFD_Tag_Definitions, Canon
******************************************************************************/


















/******************************************************************************
* Global Variable:      Canon_Camera_Settings_1_Tag_Values
*
* Contents:     This global variable provides definitions for the Canon Camera
*               Settings 1 Makernote tag, indexed by their offset.
*
******************************************************************************/

$GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ] = array(

1 => array(     'Name' => "Macro Mode",
                1 => "Macro",

⌨️ 快捷键说明

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