From 3dc95db8b7460added917b9eda0f19f89bc6564e Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Wed, 6 Mar 2002 18:21:50 +0000 Subject: [PATCH] -updated test to reflect third parameter of exif_read_data --- ext/exif/test.txt | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/ext/exif/test.txt b/ext/exif/test.txt index 7c1f3b609f..8845b2832a 100644 --- a/ext/exif/test.txt +++ b/ext/exif/test.txt @@ -13,6 +13,22 @@ * fails on executing this script. */ +$file = array_key_exists('thumbnail',$_REQUEST) ? $_REQUEST['thumbnail'] : ''; +//$file = '/t/temp/kodak-dc4800.tif'; +//$file = '/t/temp/canon-ixus.jpg'; +if ( $file) { + $image = exif_thumbnail($file); + if ( $image!==false) { + @Header("content-type: image/jpeg"); + echo $image; + } else { + echo "\n"; + echo "Thumbnail could not be extracted.\n"; + echo "
"; + } + die(); +} + $possible = array(); /****************************************************************************/ @@ -182,18 +198,18 @@ What to look for in detail: -

function exif_headername

+

function exif_tagname

- - - - + + + +\n"; + echo "\n"; } ?>
ImageWidth
JPEGProc
SceneType
false
ImageWidth
JPEGProc
SceneType
false
function exif_headername is not supported
function exif_tagname is not supported
@@ -215,8 +231,8 @@ if (function_exists('read_exif_data')) { $getimagesize = "[ $size[0], $size[1], $size[2], $size[3] ]"; } /**/ - error_log("exif_read_data($file,'COMMENT,IFD0,EXIF,APP12');",0); - $image = exif_read_data($file,'COMMENT,IFD0,EXIF,APP12'); + error_log("exif_read_data($file,'COMMENT,IFD0,EXIF,APP12', true);",0); + $image = exif_read_data($file,'COMMENT,IFD0,EXIF,APP12',true); $error = error_msg();// clear message //error_log("exif_read_data($file)",0); $res = ''; @@ -230,6 +246,7 @@ if (function_exists('read_exif_data')) { $len++; $res .= AddInfo($Name,'Array('.count($Value).')'); foreach( $Value as $idx => $Entry) { + if ($idx=='Thumbnail') $Entry = '<data>'; $len++; $res .= AddInfo($Name.':'.$idx,$Entry); } -- 2.50.1