helly Mon Dec 16 09:48:21 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/exif exif.c
/php4/ext/exif/tests exif002.phpt exif003.phpt exif004.phpt
exif005.phpt
Log:
MFH
Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.118.2.8 php4/ext/exif/exif.c:1.118.2.9
--- php4/ext/exif/exif.c:1.118.2.8 Sat Dec 14 14:53:52 2002
+++ php4/ext/exif/exif.c Mon Dec 16 09:48:20 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exif.c,v 1.118.2.8 2002/12/14 19:53:52 helly Exp $ */
+/* $Id: exif.c,v 1.118.2.9 2002/12/16 14:48:20 helly Exp $ */
/* ToDos
*
@@ -58,8 +58,10 @@
#include "ext/standard/php_image.h"
#include "ext/standard/info.h"
-#if defined(HAVE_MBSTRING) && !defined(COMPILE_DL_MBSTRING)
+#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
#define EXIF_USE_MBSTRING 1
+#else
+#define EXIF_USE_MBSTRING 0
#endif
#ifdef EXIF_USE_MBSTRING
@@ -93,7 +95,7 @@
};
/* }}} */
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.8 2002/12/14 19:53:52 helly Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.9 2002/12/16 14:48:20 helly Exp $"
/* {{{ PHP_MINFO_FUNCTION
*/
@@ -179,6 +181,7 @@
{
ZEND_INIT_MODULE_GLOBALS(exif, php_exif_init_globals, NULL);
REGISTER_INI_ENTRIES();
+ REGISTER_LONG_CONSTANT("EXIF_USE_MBSTRING", EXIF_USE_MBSTRING, CONST_CS |
+CONST_PERSISTENT);
return SUCCESS;
}
/* }}} */
Index: php4/ext/exif/tests/exif002.phpt
diff -u php4/ext/exif/tests/exif002.phpt:1.1 php4/ext/exif/tests/exif002.phpt:1.1.2.1
--- php4/ext/exif/tests/exif002.phpt:1.1 Fri Oct 25 06:59:52 2002
+++ php4/ext/exif/tests/exif002.phpt Mon Dec 16 09:48:20 2002
@@ -13,9 +13,9 @@
test2.jpg is the same image but contains Exif/Comment information and a
copy of test1.jpg as a thumbnail.
*/
-$infile = './ext/exif/tests/test1.jpg';
+$infile = dirname(__FILE__).'./test1.jpg';
echo md5_file($infile).'_'.filesize($infile);
-$thumb = exif_thumbnail('./ext/exif/tests/test2.jpg');
+$thumb = exif_thumbnail(dirname(__FILE__).'./test2.jpg');
echo " == ";
echo md5($thumb).'_'.strlen($thumb);
echo "\n";
Index: php4/ext/exif/tests/exif003.phpt
diff -u php4/ext/exif/tests/exif003.phpt:1.1.2.1
php4/ext/exif/tests/exif003.phpt:1.1.2.2
--- php4/ext/exif/tests/exif003.phpt:1.1.2.1 Thu Nov 14 17:08:30 2002
+++ php4/ext/exif/tests/exif003.phpt Mon Dec 16 09:48:20 2002
@@ -4,6 +4,7 @@
<?php
if (!extension_loaded('exif')) die('skip exif extension not available');
if (!extension_loaded('mbstring')) die('skip mbstring extension not
available');
+ if (!EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
?>
--INI--
output_handler=
@@ -18,7 +19,7 @@
copy of test1.jpg as a thumbnail.
test3.jpg is the same as test2.jpg but with a UNICODE UserComment:
ÄÖ&Üßäöü
*/
-var_dump(exif_read_data('./ext/exif/tests/test3.jpg','',true,false));
+var_dump(exif_read_data(dirname(__FILE__).'./test3.jpg','',true,false));
?>
--EXPECTF--
array(5) {
Index: php4/ext/exif/tests/exif004.phpt
diff -u php4/ext/exif/tests/exif004.phpt:1.1.2.1
php4/ext/exif/tests/exif004.phpt:1.1.2.2
--- php4/ext/exif/tests/exif004.phpt:1.1.2.1 Thu Nov 14 17:08:30 2002
+++ php4/ext/exif/tests/exif004.phpt Mon Dec 16 09:48:20 2002
@@ -4,6 +4,7 @@
<?php
if (!extension_loaded('exif')) die('skip exif extension not available');
if (!extension_loaded('mbstring')) die('skip mbstring extension not
available');
+ if (!EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
?>
--INI--
output_handler=
@@ -16,7 +17,7 @@
/*
test4.jpg is a 1*1 image that contains Exif tags written by WindowsXP
*/
-$image = exif_read_data('./ext/exif/tests/test4.jpg','',true,false);
+$image = exif_read_data(dirname(__FILE__).'./test4.jpg','',true,false);
echo var_dump($image['WINXP']);
?>
--EXPECT--
Index: php4/ext/exif/tests/exif005.phpt
diff -u php4/ext/exif/tests/exif005.phpt:1.2.2.1
php4/ext/exif/tests/exif005.phpt:1.2.2.2
--- php4/ext/exif/tests/exif005.phpt:1.2.2.1 Thu Nov 14 17:08:30 2002
+++ php4/ext/exif/tests/exif005.phpt Mon Dec 16 09:48:20 2002
@@ -10,7 +10,7 @@
/* Do not change this test it is a REATME.TESTING example.
* test5.jpg is a 1*1 image that contains an Exif section with ifd = 00000009h
*/
-$image = exif_read_data('./ext/exif/tests/test5.jpg','',true,false);
+$image = exif_read_data(dirname(__FILE__).'./test5.jpg','',true,false);
var_dump($image['IFD0']);
?>
--EXPECT--
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php