-support for array tags

-better memory handling
-support for thumbnails in TIFF format
-new functions exif_imagetype
@-new function exif_imagetype
@-exif_thumbnail fupports thumbnails in TIFF format and can return size
@ of thumbnail
This commit is contained in:
Marcus Boerger 2002-03-12 06:14:45 +00:00
parent e39dcad91a
commit 06a242169c
3 changed files with 1077 additions and 417 deletions

File diff suppressed because it is too large Load Diff

View File

@ -26,4 +26,5 @@ extern zend_module_entry exif_module_entry;
PHP_FUNCTION(exif_read_data);
PHP_FUNCTION(exif_tagname);
PHP_FUNCTION(exif_thumbnail);
PHP_FUNCTION(exif_imagetype);
#endif

View File

@ -220,14 +220,17 @@ if (function_exists('exif_tagname')) {
</table>
<br clear="all">
<h2>function exif_read_data for <?=count($possible)?> images</h2>
<table border='1' cellspacing='0' cellpadding='3' summary="EXIF information">
<?php
if (function_exists('exif_read_data')) {
$num = 0;
$num = 0;
$tab1 = "<table border='1' cellspacing='0' cellpadding='3' summary='function results'>\n";
$tab2 = "";//"<table border='1' cellspacing='0' cellpadding='3' summary='EXIF information'>\n";
foreach($possible as $idx => $file) {
$num++;
$error = '';
$len = 4;
$tab1 .= "<tr><td rowspan='3' valign='top'>$num</td><th colspan='2'>$file</th></tr>\n";
$size = GetImageSize($file);
$error = error_msg();// clear message
if ( $size === false) {
@ -235,10 +238,12 @@ if (function_exists('exif_read_data')) {
} else {
$getimagesize = "[ $size[0], $size[1], $size[2], $size[3] ]";
}
$tab1 .= AddInfo("GetImageSize",$error);
/**/
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
$tab1 .= AddInfo("exif_read_data",$error);
error_log("exif_read_data($file,'COMMENT,IFD0,EXIF,APP12', true): $error",0);
//error_log("exif_read_data($file)",0);
$res = '';
@ -263,16 +268,19 @@ if (function_exists('exif_read_data')) {
}
}
}
echo "<tr><td rowspan='$len' valign='top'>$num</td></tr>\n";
echo "<tr><th colspan='2'>$file</th></tr>\n";
echo "<tr><td><b>GetImageSize</b></td><td>$getimagesize</td></tr>\n";
echo "<tr><td><b>exif_read_data</b></td><td>$error</td></tr>\n";
echo $res;
$tab2 .= "<tr><td rowspan='$len' valign='top'>$num</td></tr>\n";
$tab2 .= "<tr><th colspan='2'>$file</th></tr>\n";
$tab2 .= "<tr><td><b>GetImageSize</b></td><td>$getimagesize</td></tr>\n";
$tab2 .= "<tr><td><b>exif_read_data</b></td><td>$error</td></tr>\n";
$tab2 .= $res;
}
//$tab1 .= "</table>\n";
$tab2 .= "</table>\n";
echo $tab1;
echo $tab2;
} else {
echo "<tr><td>function exif_read_data is not supported</td></tr>\n";
echo "<h1 style='color:red'>function exif_read_data is not supported</h1>\n";
}
?>
</table>
</body>
</html>