当前位置: 首页>>代码示例>>PHP>>正文


PHP read_Multiple_IFDs函数代码示例

本文整理汇总了PHP中read_Multiple_IFDs函数的典型用法代码示例。如果您正苦于以下问题:PHP read_Multiple_IFDs函数的具体用法?PHP read_Multiple_IFDs怎么用?PHP read_Multiple_IFDs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了read_Multiple_IFDs函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_Canon_Makernote

function get_Canon_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Canon
    if (stristr($Make_Field, "Canon") === FALSE) {
        // Canon not found in Make Field - can't process this
        return FALSE;
    }
    // Seek to the start of the IFD
    fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset']);
    // Read the IFD(s) into an array
    $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Canon");
    // Save some information into the Tag element to aid interpretation
    $Makernote_Tag['Decoded'] = TRUE;
    $Makernote_Tag['Makernote Type'] = "Canon";
    $Makernote_Tag['Makernote Tags'] = "Canon";
    // Return the new tag
    return $Makernote_Tag;
}
开发者ID:evanhunter,项目名称:PJMT,代码行数:18,代码来源:canon.php

示例2: get_Epson_Makernote

function get_Epson_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Epson
    if (stristr($Make_Field, "Epson") === FALSE) {
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 8) != "EPSON") {
        // This isn't a Epson Makernote, abort
        return FALSE;
    }
    // Seek to the start of the IFD
    fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 8);
    // Read the IFD(s) into an array
    $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Olympus");
    // Save some information into the Tag element to aid interpretation
    $Makernote_Tag['Decoded'] = TRUE;
    $Makernote_Tag['Makernote Type'] = "Epson";
    $Makernote_Tag['Makernote Tags'] = "Olympus";
    // Return the new tag
    return $Makernote_Tag;
}
开发者ID:cyberorca,项目名称:dfp-api,代码行数:22,代码来源:epson.php

示例3: get_Kyocera_Makernote

function get_Kyocera_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Contax or Kyocera
    if (stristr($Make_Field, "Contax") === FALSE && stristr($Make_Field, "Kyocera") === FALSE) {
        // Kyocera or Contax not found in maker field - abort
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 22) != "KYOCERA            ") {
        // This isn't a Kyocera Makernote, abort
        return FALSE;
    }
    // Seek to the start of the IFD
    fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 22);
    // Read the IFD(s) into an array
    $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Kyocera", True, False);
    // Save some information into the Tag element to aid interpretation
    $Makernote_Tag['Decoded'] = TRUE;
    $Makernote_Tag['Makernote Type'] = "Kyocera";
    $Makernote_Tag['Makernote Tags'] = "Kyocera";
    // Return the new tag
    return $Makernote_Tag;
}
开发者ID:shen0834,项目名称:util,代码行数:23,代码来源:kyocera.php

示例4: get_Sony_Makernote

function get_Sony_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Sony
    if (stristr($Make_Field, "Sony") === FALSE) {
        // This isn't a Sony makernote
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 12) != "SONY CAM " && substr($Makernote_Tag['Data'], 0, 12) != "SONY DSC ") {
        // This isn't a Sony Makernote, abort
        return FALSE;
    }
    // Seek to the start of the IFD
    fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 12);
    // Read the IFD(s) into an array
    $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Sony", FALSE, FALSE);
    // Save some information into the Tag element to aid interpretation
    $Makernote_Tag['Decoded'] = TRUE;
    $Makernote_Tag['Makernote Type'] = "Sony";
    $Makernote_Tag['Makernote Tags'] = "sony";
    // Return the new tag
    return $Makernote_Tag;
}
开发者ID:evanhunter,项目名称:PJMT,代码行数:23,代码来源:sony.php

示例5: get_Panasonic_Makernote

function get_Panasonic_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Panasonic
    if (stristr($Make_Field, "Panasonic") === FALSE) {
        // No Panasonic in the maker - abort
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 4) == "MKED") {
        // Panasonic Type 2 - Empty Makernote
        // No Makernote Data
        $Makernote_Tag['Makernote Type'] = "Panasonic Empty Makernote";
        $Makernote_Tag['Makernote Tags'] = "-";
        $Makernote_Tag['Decoded'] = TRUE;
        // Return the new tag
        return $Makernote_Tag;
    } else {
        if (substr($Makernote_Tag['Data'], 0, 12) == "Panasonic") {
            // Panasonic Type 1 - IFD Makernote
            // Seek to the start of the IFD
            fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 12);
            // Read the IFD(s) into an array
            $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Panasonic", FALSE, FALSE);
            // Save some information into the Tag element to aid interpretation
            $Makernote_Tag['Decoded'] = TRUE;
            $Makernote_Tag['Makernote Type'] = "Panasonic";
            $Makernote_Tag['Makernote Tags'] = "Panasonic";
            // Return the new tag
            return $Makernote_Tag;
        } else {
            // Unknown Header
            return FALSE;
        }
    }
    // Shouldn't get here
    return FALSE;
}
开发者ID:shen0834,项目名称:util,代码行数:37,代码来源:panasonic.php

示例6: get_Pentax_Makernote

function get_Pentax_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Pentax or Asahi
    if (stristr($Make_Field, "Pentax") === FALSE && stristr($Make_Field, "Asahi") === FALSE) {
        // Couldn't find Pentax or Asahi in the maker - abort
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 4) == "AOC") {
        // Type 2 Pentax Makernote
        // Seek to the start of the IFD
        fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 6);
        // Read the IFD(s) into an array
        $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Casio Type 2");
        // Save some information into the Tag element to aid interpretation
        $Makernote_Tag['Decoded'] = TRUE;
        $Makernote_Tag['Makernote Type'] = "Casio Type 2";
        $Makernote_Tag['Makernote Tags'] = "Casio Type 2";
        // Return the new tag
        return $Makernote_Tag;
    } else {
        // Type 1 Penax Makernote
        // Seek to the start of the IFD
        fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 0);
        // Read the IFD(s) into an array
        $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Pentax");
        // Save some information into the Tag element to aid interpretation
        $Makernote_Tag['Decoded'] = TRUE;
        $Makernote_Tag['Makernote Type'] = "Pentax";
        $Makernote_Tag['Makernote Tags'] = "Pentax";
        // Return the new tag
        return $Makernote_Tag;
    }
    // Shouldn't get here
    return FALSE;
}
开发者ID:BGCX261,项目名称:zoom-gallery-svn-to-git,代码行数:36,代码来源:Pentax.php

示例7: get_Ricoh_Makernote

function get_Ricoh_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Ricoh
    if (stristr($Make_Field, "Ricoh") === FALSE) {
        // Ricoh not in the Maker field - abort
        return FALSE;
    }
    // Check if the Text Makernote header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 2) === "Rv" || substr($Makernote_Tag['Data'], 0, 3) === "Rev") {
        // This is a text makernote - Label it as such
        $Makernote_Tag['Makernote Type'] = "Ricoh Text";
        $Makernote_Tag['Makernote Tags'] = "None";
        $Makernote_Tag['Decoded'] = TRUE;
        // Return the new Makernote tag
        return $Makernote_Tag;
    } else {
        if ($Makernote_Tag['Data'] === str_repeat("", strlen($Makernote_Tag['Data']))) {
            // This is an Empty Makernote - Label it as such
            $Makernote_Tag['Makernote Type'] = "Ricoh Empty Makernote";
            $Makernote_Tag['Makernote Tags'] = "None";
            $Makernote_Tag['Decoded'] = TRUE;
            // Return the new Makernote tag
            return $Makernote_Tag;
        } else {
            if (substr($Makernote_Tag['Data'], 0, 5) === "RICOH" || substr($Makernote_Tag['Data'], 0, 5) === "Ricoh") {
                //This is an IFD Makernote
                // Seek to the start of the IFD
                fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 8);
                // Ricoh Makernote always uses Motorola Byte Alignment
                $Makernote_Tag['ByteAlign'] = "MM";
                // Read the IFD(s) into an array
                $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Ricoh");
                // Save some information into the Tag element to aid interpretation
                $Makernote_Tag['Decoded'] = TRUE;
                $Makernote_Tag['Makernote Type'] = "Ricoh";
                $Makernote_Tag['Makernote Tags'] = "Ricoh";
                // Ricoh Makernotes can have a tag 0x2001 which is a Sub-IFD
                // Check if the tag exists
                if ($Makernote_Tag['Decoded Data'][0] !== FALSE && array_key_exists(0x2001, $Makernote_Tag['Decoded Data'][0])) {
                    // Ricoh Sub-IFD tag exists - Process it
                    // Grab the Sub-IFD tag for easier processing
                    $SubIFD_Tag =& $Makernote_Tag['Decoded Data'][0][0x2001];
                    // Check if the Sub-IFD starts with the correct header
                    if (substr($SubIFD_Tag['Data'], 0, 19) === "[Ricoh Camera Info]") {
                        // Correct Header found
                        // Seek to the start of the Sub-IFD
                        fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $SubIFD_Tag['Offset'] + 20);
                        // Ricoh Makernote Sub-IFD always uses Motorola Byte Alignment
                        $SubIFD_Tag['ByteAlign'] = "MM";
                        // Read the IFD(s) into an array
                        $SubIFD_Tag['Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $SubIFD_Tag['ByteAlign'], "RicohSubIFD", False, False);
                        // Save some information into the Tag element to aid interpretation
                        $SubIFD_Tag['Decoded'] = TRUE;
                        $SubIFD_Tag['Makernote Type'] = "Ricoh";
                        $SubIFD_Tag['Makernote Tags'] = "RicohSubIFD";
                        // Change the tag type to a Sub-IFD so it is handled automatically for interpretation
                        $SubIFD_Tag['Type'] = "SubIFD";
                        $SubIFD_Tag['Tags Name'] = "RicohSubIFD";
                    } else {
                        // Couldn't find header of Sub-IFD - Probably corrupt
                        $SubIFD_Tag['Type'] = "String";
                        $SubIFD_Tag['Text Value'] = "Corrupted Ricoh Sub IFD";
                    }
                }
                // Return the new makernote tag
                return $Makernote_Tag;
            } else {
                // Unrecognised header for makernote - abort
                return FALSE;
            }
        }
    }
}
开发者ID:BGCX261,项目名称:zoom-gallery-svn-to-git,代码行数:73,代码来源:ricoh.php

示例8: get_Nikon_Makernote

function get_Nikon_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Nikon
    if (stristr($Make_Field, "Nikon") === FALSE) {
        // Nikon not found in maker field - abort
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 8) == "Nikon") {
        // Nikon Type 1 Makernote
        // Seek to the start of the IFD
        fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 8);
        // Read the IFD(s) into an array
        $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Nikon Type 1");
        // Save some information into the Tag element to aid interpretation
        $Makernote_Tag['Decoded'] = TRUE;
        $Makernote_Tag['Makernote Type'] = "Nikon Type 1";
        $Makernote_Tag['Makernote Tags'] = "Nikon Type 1";
        // Return the new tag
        return $Makernote_Tag;
    } else {
        if (substr($Makernote_Tag['Data'], 0, 10) == "Nikon" || substr($Makernote_Tag['Data'], 0, 10) == "Nikon") {
            // Nikon Type 3 Makernote
            // Seek to the start of the IFD
            fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 10);
            // Read the TIFF header and IFD(s) into an array
            $Makernote_Tag['Decoded Data'] = process_TIFF_Header($filehnd, "Nikon Type 3");
            // Save some information into the Tag element to aid interpretation
            $Makernote_Tag['Makernote Type'] = "Nikon Type 3";
            $Makernote_Tag['Makernote Tags'] = "Nikon Type 3";
            $Makernote_Tag['Decoded'] = TRUE;
            // Return the new tag
            return $Makernote_Tag;
        } else {
            if (substr($Makernote_Tag['Data'], 0, 8) == "FUJIFILM") {
                // Fuji Makernote - used by Nikon Coolpix 775
                // Let the Fujifilm library handle it
                return False;
            } else {
                // No header - Nikon Type 2
                // Seek to the start of the IFD
                fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 0);
                // Read the IFD(s) into an array
                $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Nikon Type 3");
                // Save some information into the Tag element to aid interpretation
                $Makernote_Tag['Decoded'] = TRUE;
                $Makernote_Tag['Makernote Type'] = "Nikon Type 2";
                $Makernote_Tag['Makernote Tags'] = "Nikon Type 3";
                // Return the new tag
                return $Makernote_Tag;
            }
        }
    }
    // Shouldn't get here
    return FALSE;
}
开发者ID:BGCX261,项目名称:zoom-gallery-svn-to-git,代码行数:56,代码来源:nikon.php

示例9: get_Fujifilm_Makernote

function get_Fujifilm_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Fuji or Nikon (One Nikon camera uses this format Makernote)
    if (stristr($Make_Field, "Fuji") === FALSE && stristr($Make_Field, "Nikon") === FALSE) {
        // Couldn't find Fuji or Nikon in the maker name - abort
        return FALSE;
    }
    // Check if the header exists at the start of the Makernote
    if (substr($Makernote_Tag['Data'], 0, 8) != "FUJIFILM") {
        // This isn't a Fuji Makernote, abort
        return FALSE;
    }
    // The 4 bytes after the header are the offset to the Fujifilm IFD
    // Get the offset of the IFD
    $ifd_offset = hexdec(bin2hex(strrev(substr($Makernote_Tag['Data'], 8, 4))));
    // Seek to the start of the IFD
    fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + $ifd_offset);
    // Fuji Makernotes are always Intel Byte Aligned
    $Makernote_Tag['ByteAlign'] = "II";
    // Read the IFD(s) into an array
    $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'], $Makernote_Tag['ByteAlign'], "Fujifilm");
    // Save some information into the Tag element to aid interpretation
    $Makernote_Tag['Decoded'] = TRUE;
    $Makernote_Tag['Makernote Type'] = "Fujifilm";
    $Makernote_Tag['Makernote Tags'] = "Fujifilm";
    // Return the new tag
    return $Makernote_Tag;
}
开发者ID:shen0834,项目名称:util,代码行数:28,代码来源:fujifilm.php

示例10: read_IFD_universal


//.........这里部分代码省略.........
            }
            // Read the data block from the offset position
            $DataStr = network_safe_fread($filehnd, $Total_Data_Size);
        } else {
            // The data block is less than 4 bytes, and is provided in the IFD entry, so read it
            $DataStr = substr($IFD_Data, $pos, $Total_Data_Size);
        }
        // Increment the position past the data
        $pos += 4;
        // Now create the entry for output array
        $Data_Array = array();
        // Read the data items from the data block
        if ($Data_Type != 2 && $Data_Type != 7) {
            // The data type is Numerical, Read the data items from the data block
            for ($j = 0; $j < $Data_Count; $j++) {
                $Part_Data_Str = substr($DataStr, $j * $GLOBALS['IFD_Data_Sizes'][$Data_Type], $GLOBALS['IFD_Data_Sizes'][$Data_Type]);
                $Data_Array[] = get_IFD_Data_Type($Part_Data_Str, $Data_Type, $Byte_Align);
            }
        } elseif ($Data_Type == 2) {
            // The data type is String(s)   (type 2)
            // Strip the last terminating Null
            $DataStr = substr($DataStr, 0, strlen($DataStr) - 1);
            // Split the data block into multiple strings whereever there is a Null
            $Data_Array = explode("", $DataStr);
        } else {
            // The data type is Unknown (type 7)
            // Do nothing to data
            $Data_Array = $DataStr;
        }
        // If this is a Sub-IFD entry,
        if (array_key_exists($Tag_No, $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name]) && "SubIFD" == $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No]['Type']) {
            // This is a Sub-IFD entry, go and process the data forming Sub-IFD and use its output array as the new data for this entry
            fseek($filehnd, $Tiff_offset + $Data_Array[0]);
            $Data_Array = read_Multiple_IFDs($filehnd, $Tiff_offset, $Byte_Align, $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No]['Tags Name']);
        }
        $desc = "";
        $units = "";
        // Check if this tag exists in the list of tag definitions,
        if (array_key_exists($Tag_No, $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name])) {
            if (array_key_exists('Description', $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No])) {
                $desc = $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No]['Description'];
            }
            if (array_key_exists('Units', $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No])) {
                $units = $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No]['Units'];
            }
            // Tag exists in definitions, append details to output array
            $OutputArray[$Tag_No] = array("Tag Number" => $Tag_No, "Tag Name" => $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No]['Name'], "Tag Description" => $desc, "Data Type" => $Data_Type, "Type" => $GLOBALS["IFD_Tag_Definitions"][$Tag_Definitions_Name][$Tag_No]['Type'], "Units" => $units, "Data" => $Data_Array);
        } else {
            // Tag doesnt exist in definitions, append unknown details to output array
            $OutputArray[$Tag_No] = array("Tag Number" => $Tag_No, "Tag Name" => "Unknown Tag #" . $Tag_No, "Tag Description" => "", "Data Type" => $Data_Type, "Type" => "Unknown", "Units" => "", "Data" => $Data_Array);
        }
        // Some information of type "Unknown" (type 7) might require information about
        // how it's position and byte alignment in order to be decoded
        if ($Data_Type == 7) {
            $OutputArray[$Tag_No]['Offset'] = $Data_Start_pos;
            $OutputArray[$Tag_No]['Byte Align'] = $Byte_Align;
        }
        ////////////////////////////////////////////////////////////////////////
        // Special Data handling
        ////////////////////////////////////////////////////////////////////////
        // Check if this is a Print Image Matching entry
        if ($OutputArray[$Tag_No]['Type'] == "PIM") {
            // This is a Print Image Matching entry, decode it.
            $OutputArray[$Tag_No] = Decode_PIM($OutputArray[$Tag_No], $Tag_Definitions_Name);
        }
        // Interpret the entry into a text string using a custom interpreter
开发者ID:evanhunter,项目名称:PJMT,代码行数:67,代码来源:EXIF.php

示例11: get_Casio_Makernote

function get_Casio_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    // Check if the Make Field contains the word Casio
    if (stristr($Make_Field, "Casio") === FALSE) {
        return FALSE;
    }
    if (substr($Makernote_Tag['Data'], 0, 6) == "QVC") {
        // Seek to the start of the IFD
        fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 6);
        $Makernote_Tag['ByteAlign'] = "MM";
        // Read the IFD(s) into an array
        $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Casio Type 2");
        // Save some information into the Tag element to aid interpretation
        $Makernote_Tag['Decoded'] = TRUE;
        $Makernote_Tag['Makernote Type'] = "Casio Type 2";
        $Makernote_Tag['Makernote Tags'] = "Casio Type 2";
        // Return the new tag
        return $Makernote_Tag;
    } else {
        // Seek to the start of the IFD
        fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 0);
        $Makernote_Tag['ByteAlign'] = "MM";
        // Read the IFD(s) into an array
        $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Casio Type 1");
        // Save some information into the Tag element to aid interpretation
        $Makernote_Tag['Decoded'] = TRUE;
        $Makernote_Tag['Makernote Type'] = "Casio Type 1";
        $Makernote_Tag['Makernote Tags'] = "Casio Type 1";
        // Return the new tag
        return $Makernote_Tag;
    }
}
开发者ID:cyberorca,项目名称:dfp-api,代码行数:32,代码来源:casio.php

示例12: get_Minolta_Makernote

function get_Minolta_Makernote($Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field)
{
    if (stristr($Make_Field, "Konica") === FALSE && stristr($Make_Field, "Minolta") === FALSE) {
        // Not a Konica/Minolta Makernote - Cannot decode it
        return False;
    }
    // There are several different headers for a Konica/Minolta Makernote
    // Unfortunately only one type can be decoded (the one without a header)
    // Check which header exists (if any)
    if (substr($Makernote_Tag['Data'], 0, 3) == "MLY") {
        // MLY Header - Can't Decode this
        return $Makernote_Tag;
    } else {
        if (substr($Makernote_Tag['Data'], 0, 2) == "KC") {
            // KC Header - Can't Decode this
            return $Makernote_Tag;
        }
    }
    if (substr($Makernote_Tag['Data'], 0, 8) == "+M+M+M+M") {
        // +M+M+M+M Header - Can't Decode this
        return $Makernote_Tag;
    } else {
        if (substr($Makernote_Tag['Data'], 0, 5) == "MINOL") {
            // MINOL Header - Can't Decode this
            return $Makernote_Tag;
        } else {
            // No Header - Decode the IFD
            // Seek to the start of the IFD
            fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset']);
            // Read the IFD(s) into an array
            $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs($filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Olympus");
            // Save some information into the Tag element to aid interpretation
            $Makernote_Tag['Decoded'] = TRUE;
            $Makernote_Tag['Makernote Type'] = "Minolta";
            $Makernote_Tag['Makernote Tags'] = "Olympus";
            // Return the new tag
            return $Makernote_Tag;
        }
    }
    // Shouldn't get here
    return False;
}
开发者ID:shen0834,项目名称:util,代码行数:42,代码来源:konica_minolta.php


注:本文中的read_Multiple_IFDs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。