예제 #1
0
파일: panasonic.php 프로젝트: shen0834/util
function get_Panasonic_Makernote_Html($Makernote_tag, $filename)
{
    if ($Makernote_tag['Makernote Type'] == "Panasonic") {
        return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
    } else {
        if ($Makernote_tag['Makernote Type'] == "Panasonic Empty Makernote") {
            // Do Nothing
            return "";
        } else {
            // Unknown Makernote Type
            return FALSE;
        }
    }
    // Shouldn't get here
    return FALSE;
}
예제 #2
0
파일: olympus.php 프로젝트: shen0834/util
function get_Olympus_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Olympus tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Tags'] != "Olympus") {
        // Not Olympus tags - can't interpret with this function
        return FALSE;
    }
    // Check if the Decoded data is valid
    if ($Makernote_tag['Decoded Data'][0] === FALSE) {
        // Decoded data is not valid - can't interpret with this function
        return FALSE;
    }
    // Minolta Thumbnail 1
    if (array_key_exists(0x88, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Olympus") {
        // 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_minolta_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__) . "/..");
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][0x88]['Text Value'] = "<a class=\"EXIF_Minolta_Thumb_Link\" href=\"{$link_str}\" ><img class=\"EXIF_Minolta_Thumb\" src=\"{$link_str}\"></a>";
        $Makernote_tag['Decoded Data'][0][0x88]['Type'] = "String";
    }
    // Minolta Thumbnail 2
    if (array_key_exists(0x81, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Olympus") {
        // 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_minolta_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__) . "/..");
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][0x81]['Text Value'] = "<a class=\"EXIF_Minolta_Thumb_Link\" href=\"{$link_str}\" ><img class=\"EXIF_Minolta_Thumb\" src=\"{$link_str}\"></a>";
        $Makernote_tag['Decoded Data'][0][0x81]['Type'] = "String";
    }
    // Interpret the IFD and return the HTML
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #3
0
function get_Pentax_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this is a Pentax type makernote
    if ($Makernote_tag['Makernote Type'] != "Pentax") {
        // Not a Pentax makernote - abort
        return False;
    }
    // Interpret the IFD and return the html
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #4
0
function get_Nikon_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this is a Nikon Makernote, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Nikon Type 1" && $Makernote_tag['Makernote Type'] != "Nikon Type 2" && $Makernote_tag['Makernote Type'] != "Nikon Type 3") {
        // Not a Nikon Makernote - cannot interpret it - abort
        return FALSE;
    }
    // Interpret the IFD and return the HTML
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #5
0
function get_Ricoh_Makernote_Html($Makernote_tag, $filename)
{
    // Check if this makernote is Ricoh IFD type
    if ($Makernote_tag['Makernote Type'] == "Ricoh") {
        // This is a Ricoh IFD makernote - interpret it
        return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
    } else {
        if ($Makernote_tag['Makernote Type'] == "Ricoh Text") {
            // This is a Ricoh text makernote
            //  Construct the start of enclosing html for the text
            $output_str = "<table  class=\"EXIF_Table\"border=1><tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Value_Cell\">";
            // Replace the semicolon dividers with line break html tags
            $output_str .= str_replace(";", "<BR>\n", $Makernote_tag['Data']);
            // Close the html
            $output_str .= "</td></tr></table>";
            // Return the html
            return $output_str;
        } else {
            if ($Makernote_tag['Makernote Type'] == "Ricoh Empty Makernote") {
                // Do Nothing
                return "";
            } else {
                // Don't recognise the Makernote type - not a Ricoh makernote
                return FALSE;
            }
        }
    }
}
예제 #6
0
파일: kyocera.php 프로젝트: shen0834/util
function get_Kyocera_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this is a Kyocera Makernote, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Kyocera") {
        // Not a Kyocera Makernote - cannot interpret it - abort
        return False;
    }
    // Interpret the IFD and return the HTML
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #7
0
파일: fujifilm.php 프로젝트: shen0834/util
function get_Fujifilm_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Fujifilm tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Fujifilm") {
        // Not Fujifilm tags - can't interpret with this function
        return FALSE;
    }
    // Interpret the IFD normally
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #8
0
function get_Sony_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Sony tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Sony") {
        // Not Sony tags - can't interpret with this function
        return FALSE;
    }
    // Interpret the IFD and return the HTML
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #9
0
파일: canon.php 프로젝트: evanhunter/PJMT
function get_Canon_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this makernote uses canon tags
    if ($Makernote_tag['Makernote Type'] != "Canon") {
        // Makernote doesn't use Canon tags - cant Interpret it
        return FALSE;
    }
    // Interpret the IFD to html
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #10
0
파일: EXIF.php 프로젝트: evanhunter/PJMT
function interpret_IFD($IFD_array, $filename)
{
    // Create the output string with the table tag
    $output_str = "<table class=\"EXIF_Table\" border=1>\n";
    // Create an extra output string to receive any supplementary html
    // which cannot go inside the table
    $extra_IFD_str = "";
    // Check that the IFD array is valid
    if ($IFD_array === FALSE || $IFD_array === NULL) {
        // the IFD array is NOT valid - exit
        return "";
    }
    // Check if this is an EXIF IFD and if there is a makernote present
    if ($IFD_array['Tags Name'] === "EXIF" && !array_key_exists(37500, $IFD_array)) {
        // This is an EXIF IFD but NO makernote is present - Add a message to the output
        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">No Makernote Present</h3>";
    }
    // Cycle through each tag in the IFD
    foreach ($IFD_array as $Tag_ID => $Exif_Tag) {
        // Ignore the non numeric elements - they aren't tags
        if (!is_numeric($Tag_ID)) {
            // Skip Tags Name
        } else {
            if ($Exif_Tag['Decoded'] == TRUE) {
                // This tag has been successfully decoded
                // Table cells won't get drawn with nothing in them -
                // Ensure that at least a non breaking space exists in them
                if (trim($Exif_Tag['Text Value']) == "") {
                    $Exif_Tag['Text Value'] = "&nbsp;";
                }
                // Check if the tag is a sub-IFD
                if ($Exif_Tag['Type'] == "SubIFD") {
                    // This is a sub-IFD tag
                    // Add a sub-heading for the sub-IFD
                    $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">" . $Exif_Tag['Tag Name'] . " contents</h3>";
                    // Cycle through each sub-IFD in the chain
                    foreach ($Exif_Tag['Data'] as $subIFD) {
                        // Interpret this sub-IFD and add the html to the secondary output
                        $extra_IFD_str .= interpret_IFD($subIFD, $filename);
                    }
                } else {
                    if ($Exif_Tag['Type'] == "Maker Note") {
                        // This is a Makernote Tag
                        // Add a sub-heading for the Makernote
                        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Maker Note Contents</h3>";
                        // Interpret the Makernote and add the html to the secondary output
                        $extra_IFD_str .= Interpret_Makernote_to_HTML($Exif_Tag, $filename);
                    } else {
                        if ($Exif_Tag['Type'] == "IPTC") {
                            // This is a IPTC/NAA Record, interpret it and output to the secondary html
                            $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains IPTC/NAA Embedded in EXIF</h3>";
                            $extra_IFD_str .= Interpret_IPTC_to_HTML($Exif_Tag['Data']);
                        } else {
                            if ($Exif_Tag['Type'] == "XMP") {
                                // This is a XMP Record, interpret it and output to the secondary html
                                $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains XMP Embedded in EXIF</h3>";
                                $extra_IFD_str .= Interpret_XMP_to_HTML($Exif_Tag['Data']);
                            } else {
                                if ($Exif_Tag['Type'] == "IRB") {
                                    // This is a Photoshop IRB Record, interpret it and output to the secondary html
                                    $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains Photoshop IRB Embedded in EXIF</h3>";
                                    $extra_IFD_str .= Interpret_IRB_to_HTML($Exif_Tag['Data'], $filename);
                                } else {
                                    if ($Exif_Tag['Type'] == "Numeric") {
                                        // Numeric Tag - Output text value as is.
                                        $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\">" . $Exif_Tag['Text Value'] . "</td></tr>\n";
                                    } else {
                                        // Other tag - Output text as preformatted
                                        $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><pre>" . trim($Exif_Tag['Text Value']) . "</pre></td></tr>\n";
                                    }
                                }
                            }
                        }
                    }
                }
            } else {
                // Tag has NOT been decoded successfully
                // Hence it is either an unknown tag, or one which
                // requires processing at the time of html construction
                // Table cells won't get drawn with nothing in them -
                // Ensure that at least a non breaking space exists in them
                if (trim($Exif_Tag['Text Value']) == "") {
                    $Exif_Tag['Text Value'] = "&nbsp;";
                }
                // Check if this tag is the first IFD Thumbnail
                if ($IFD_array['Tags Name'] == "TIFF" && $Tag_ID == 513) {
                    // This is the first IFD thumbnail - Add html to the output
                    // 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_exif_thumb.php", getcwd());
                    $link_str .= "?filename=";
                    $link_str .= get_relative_path($filename, dirname(__FILE__));
                    // Add thumbnail link to html
                    $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><a class=\"EXIF_First_IFD_Thumb_Link\" href=\"{$link_str}\"><img class=\"EXIF_First_IFD_Thumb\" src=\"{$link_str}\"></a></td></tr>\n";
                } else {
                    if ($Exif_Tag['Type'] == "Maker Note") {
                        // This is the makernote, but has not been decoded
                        // Add a message to the secondary output
                        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Makernote Coding Unknown</h3>\n";
                    } else {
                        // This is an Unknown Tag
                        // Check if the user wants to hide unknown tags
                        if ($GLOBALS['HIDE_UNKNOWN_TAGS'] === FALSE) {
                            // User wants to display unknown tags
                            // Check if the Data is an ascii string
                            if ($Exif_Tag['Data Type'] == 2) {
                                // This is a Ascii String field - add it preformatted to the output
                                $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><pre>" . trim($Exif_Tag['Text Value']) . "</pre></td></tr>\n";
                            } else {
                                // Not an ASCII string - add it as is to the output
                                $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\">" . trim($Exif_Tag['Text Value']) . "</td></tr>\n";
                            }
                        }
                    }
                }
            }
        }
    }
    // Close the table in the output
    $output_str .= "</table>\n";
    // Add the secondary output at the end of the main output
    $output_str .= "{$extra_IFD_str}\n";
    // Return the resulting html
    return $output_str;
}
예제 #11
0
파일: casio.php 프로젝트: cyberorca/dfp-api
function get_Casio_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Casio tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Casio Type 1" && $Makernote_tag['Makernote Type'] != "Casio Type 2") {
        // Not Casio tags - can't interpret with this function
        return FALSE;
    }
    // Casio Thumbnail (Tag 4)
    if (array_key_exists(4, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Casio Type 2") {
        // 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_casio_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__));
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][4]['Text Value'] = "<a class=\"EXIF_Casio_Thumb_Link\" href=\"{$link_str}\"><img class=\"EXIF_Casio_Thumb\" src=\"{$link_str}\"></a></td></tr>\n";
        $Makernote_tag['Decoded Data'][0][4]['Type'] = "String";
    }
    // Casio Thumbnail (Tag 8192)
    if (array_key_exists(8192, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Casio Type 2") {
        // 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_casio_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__) . "/..");
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][8192]['Text Value'] = "<a class=\"EXIF_Casio_Thumb_Link\" href=\"{$link_str}\"><img class=\"EXIF_Casio_Thumb\" src=\"{$link_str}\"></a></td></tr>\n";
        $Makernote_tag['Decoded Data'][0][8192]['Type'] = "String";
    }
    // Check if there are two thumbnail offset tags
    if (array_key_exists(4, $Makernote_tag['Decoded Data'][0]) && array_key_exists(8192, $Makernote_tag['Decoded Data'][0])) {
        // There are two copies of the thumbnail offset - Remove one
        array_splice($Makernote_tag['Decoded Data'][0], 4, 1);
    }
    // Interpret the IFD and return the html
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #12
0
function get_Olympus_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Olympus tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Tags'] != "Olympus") {
        // Not Olympus tags - can't interpret with this function
        return FALSE;
    }
    // Check if the Decoded data is valid
    if ($Makernote_tag['Decoded Data'][0] === FALSE) {
        // Decoded data is not valid - can't interpret with this function
        return FALSE;
    }
    // Minolta Thumbnail 1
    if (array_key_exists(0x88, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Olympus") {
        $Makernote_tag['Decoded Data'][0][0x88]['Text Value'] = "<a class=\"EXIF_Minolta_Thumb_Link\" href=\"get_minolta_thumb.php?filename={$filename}\" ><img class=\"EXIF_Minolta_Thumb\" src=\"get_minolta_thumb.php?filename={$filename}\"></a>";
        $Makernote_tag['Decoded Data'][0][0x88]['Type'] = "String";
    }
    // Minolta Thumbnail 2
    if (array_key_exists(0x81, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Olympus") {
        $Makernote_tag['Decoded Data'][0][0x81]['Text Value'] = "<a class=\"EXIF_Minolta_Thumb_Link\" href=\"get_minolta_thumb.php?filename={$filename}\" ><img class=\"EXIF_Minolta_Thumb\" src=\"get_minolta_thumb.php?filename={$filename}\"></a>";
        $Makernote_tag['Decoded Data'][0][0x81]['Type'] = "String";
    }
    // Interpret the IFD and return the HTML
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #13
0
function get_Casio_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Casio tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Casio Type 1" && $Makernote_tag['Makernote Type'] != "Casio Type 2") {
        // Not Casio tags - can't interpret with this function
        return FALSE;
    }
    // Casio Thumbnail (Tag 4)
    if (array_key_exists(4, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Casio Type 2") {
        $Makernote_tag['Decoded Data'][0][4]['Text Value'] = "<a class=\"EXIF_Casio_Thumb_Link\" href=\"get_casio_thumb.php?filename={$filename}\"><img class=\"EXIF_Casio_Thumb\" src=\"get_casio_thumb.php?filename={$filename}\"></a>";
        $Makernote_tag['Decoded Data'][0][4]['Type'] = "String";
    }
    // Casio Thumbnail (Tag 8192)
    if (array_key_exists(8192, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Casio Type 2") {
        $Makernote_tag['Decoded Data'][0][8192]['Text Value'] = "<a class=\"EXIF_Casio_Thumb_Link\" href=\"get_casio_thumb.php?filename={$filename}\"><img class=\"EXIF_Casio_Thumb\" src=\"get_casio_thumb.php?filename={$filename}\"></a>";
        $Makernote_tag['Decoded Data'][0][8192]['Type'] = "String";
    }
    // Check if there are two thumbnail offset tags
    if (array_key_exists(4, $Makernote_tag['Decoded Data'][0]) && array_key_exists(8192, $Makernote_tag['Decoded Data'][0])) {
        // There are two copies of the thumbnail offset - Remove one
        array_splice($Makernote_tag['Decoded Data'][0], 4, 1);
    }
    // Interpret the IFD and return the html
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
예제 #14
0
function interpret_IFD($IFD_array, $filename)
{
    global $mosConfig_live_site, $zoom;
    // Create the output string with the table tag
    $output_str = "<table class=\"EXIF_Table\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" width=\"70%\">\n";
    // Create an extra output string to receive any supplementary html
    // which cannot go inside the table
    $extra_IFD_str = "";
    // Check that the IFD array is valid
    if ($IFD_array === FALSE || $IFD_array === NULL) {
        // the IFD array is NOT valid - exit
        return "";
    }
    // Check if this is an EXIF IFD and if there is a makernote present
    if ($IFD_array['Tags Name'] === "EXIF" && !array_key_exists(37500, $IFD_array)) {
        // This is an EXIF IFD but NO makernote is present - Add a message to the output
        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">No Makernote Present</h3>";
    }
    // Cycle through each tag in the IFD
    foreach ($IFD_array as $Tag_ID => $Exif_Tag) {
        // Ignore the non numeric elements - they aren't tags
        if (!is_numeric($Tag_ID)) {
            // Skip Tags Name
        } else {
            if ($Exif_Tag['Decoded'] == TRUE) {
                // This tag has been successfully decoded
                // Table cells won't get drawn with nothing in them -
                // Ensure that at least a non breaking space exists in them
                if (trim($Exif_Tag['Text Value']) == "") {
                    $Exif_Tag['Text Value'] = "&nbsp;";
                }
                // Check if the tag is a sub-IFD
                if ($Exif_Tag['Type'] == "SubIFD") {
                    // This is a sub-IFD tag
                    // Add a sub-heading for the sub-IFD
                    $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">" . $Exif_Tag['Tag Name'] . " contents</h3>";
                    // Cycle through each sub-IFD in the chain
                    foreach ($Exif_Tag['Data'] as $subIFD) {
                        // Interpret this sub-IFD and add the html to the secondary output
                        $extra_IFD_str .= interpret_IFD($subIFD, $filename);
                    }
                } else {
                    if ($Exif_Tag['Type'] == "Maker Note") {
                        // This is a Makernote Tag
                        // Add a sub-heading for the Makernote
                        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Maker Note Contents</h3>";
                        // Interpret the Makernote and add the html to the secondary output
                        $extra_IFD_str .= Interpret_Makernote_to_HTML($Exif_Tag, $filename);
                    } else {
                        if ($Exif_Tag['Type'] == "IPTC") {
                            // This is a IPTC/NAA Record, interpret it and output to the secondary html
                            $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains IPTC/NAA Embedded in EXIF</h3>";
                            $extra_IFD_str .= Interpret_IPTC_to_HTML($Exif_Tag['Data']);
                        } else {
                            if ($Exif_Tag['Type'] == "Numeric") {
                                // Numeric Tag - Output text value as is.
                                $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\">" . $Exif_Tag['Text Value'] . "</td></tr>\n";
                            } else {
                                // Other tag - Output text as preformatted
                                $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><pre>" . trim($Exif_Tag['Text Value']) . "</pre></td></tr>\n";
                            }
                        }
                    }
                }
            } else {
                // Tag has NOT been decoded successfully
                // Hence it is either an unknown tag, or one which
                // requires processing at the time of html construction
                // Table cells won't get drawn with nothing in them -
                // Ensure that at least a non breaking space exists in them
                if (trim($Exif_Tag['Text Value']) == "") {
                    $Exif_Tag['Text Value'] = "&nbsp;";
                }
                // Check if this tag is the first IFD Thumbnail
                if ($IFD_array['Tags Name'] == "TIFF" && $Tag_ID == 513) {
                    if ($zoom->_CONFIG['hotlinkProtection']) {
                        $filename = $zoom->encrypt($filename);
                    }
                    // This is the first IFD thumbnail - Add html to the output
                    $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><a class=\"EXIF_First_IFD_Thumb_Link\" href=\"" . $mosConfig_live_site . "/components/com_zoom/lib/iptc/get_exif_thumb.php?filename=" . $filename . "\"><img class=\"EXIF_First_IFD_Thumb\" src=\"" . $mosConfig_live_site . "/components/com_zoom/lib/iptc/get_exif_thumb.php?filename=" . $filename . "\" alt=\"\" /></a></td></tr>\n";
                } else {
                    if ($Exif_Tag['Type'] == "Maker Note") {
                        // This is the makernote, but has not been decoded
                        // Add a message to the secondary output
                        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Makernote Coding Unknown</h3>\n";
                    } else {
                        // This is an Unknown Tag
                        // Check if the user wants to hide unknown tags
                        if ($GLOBALS['HIDE_UNKNOWN_TAGS'] === FALSE) {
                            // User wants to display unknown tags
                            // Check if the Data is an ascii string
                            if ($Exif_Tag['Data Type'] == 2) {
                                // This is a Ascii String field - add it preformatted to the output
                                $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><pre>" . trim($Exif_Tag['Text Value']) . "</pre></td></tr>\n";
                            } else {
                                // Not an ASCII string - add it as is to the output
                                $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\">" . trim($Exif_Tag['Text Value']) . "</td></tr>\n";
                            }
                        }
                    }
                }
            }
        }
    }
    // Close the table in the output
    $output_str .= "</table>\n";
    // Add the secondary output at the end of the main output
    $output_str .= "{$extra_IFD_str}\n";
    // Return the resulting html
    return $output_str;
}