Exemplo n.º 1
0
*               Place, Suite 330, Boston, MA  02111-1307  USA
*
*               If you require a different license for commercial or other
*               purposes, please contact the author: evan@ozhiker.com
*
******************************************************************************/
// Ensure that nothing can write to the standard io, before we get the header out
ob_start();
include 'JPEG.php';
include 'JFIF.php';
// retrieve the filename from the URL parameters
$filename = $_GET['filename'];
// Retrieve the JPEG header Data
$jpeg_header_data = get_jpeg_header_data($filename);
// Retrieve any JFXX data in the file
$JFXX_array = get_JFXX($jpeg_header_data);
// Check if JFXX data was retrieved
if ($JFXX_array === FALSE) {
    // No JFXX data could be retrieved - abort
    ob_end_clean();
    echo "<p>JFXX Data could not be retrieved</p>\n";
    return;
}
// Check the JFXX extension code which indicates what format
// the thumbnail is encoded with
if ($JFXX_array['Extension_Code'] == 0x10) {
    // JPEG Encoding - Output JPEG Data
    ob_end_clean();
    header("Content-type: image/jpeg");
    print $JFXX_array['ThumbData'];
    return;
Exemplo n.º 2
0
        <BR>
        <HR>
        <BR>

        Output the JPEG File Interchange Format Information -->
        <?php 
echo Interpret_JFIF_to_HTML(get_JFIF($jpeg_header_data), $filename);
?>

        <BR>
        <HR>
        <BR>

        Output the JFIF Extension Information -->
        <?php 
echo Interpret_JFXX_to_HTML(get_JFXX($jpeg_header_data), $filename);
?>

        <BR>
        <HR>
        <BR>

        Output the Picture Info Text -->
        <?php 
echo Interpret_App12_Pic_Info_to_HTML($jpeg_header_data);
?>

        <BR>
        <HR>
        <BR>