cvs: php4 /ext/standard image.c
| From: | Thies C. Arntzen | Date: | Sat, 29 Jul 2000 15:29:35 +0000 |
| Subject: | cvs: php4 /ext/standard image.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-981@lists.php.net to get a copy of this message | ||
thies Sat Jul 29 08:29:35 2000 EDT
Modified files:
/php4/ext/standard image.c
Log:
@- Fix reading of IPTC via GetImageInfo() for certain JPEG files. (Thies)
Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.22 php4/ext/standard/image.c:1.23
--- php4/ext/standard/image.c:1.22 Sat Jul 1 05:23:09 2000
+++ php4/ext/standard/image.c Sat Jul 29 08:29:35 2000
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf |
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.22 2000/07/01 12:23:09 andi Exp $ */
+/* $Id: image.c,v 1.23 2000/07/29 15:29:35 thies Exp $ */
/*
* Based on Daniel Schmitt's imageinfo.c which carried the following
* Copyright notice.
@@ -223,6 +223,7 @@
unsigned short length;
unsigned char *buffer;
unsigned char markername[ 16 ];
+ zval *tmp;
length = php_read2(fp);
length -= 2; /* length includes itself */
@@ -235,7 +236,10 @@
sprintf(markername,"APP%d",marker - M_APP0);
- add_assoc_stringl(info,markername,buffer,length,1);
+ if (zend_hash_find(info->value.ht, markername, strlen(markername)+1, (void **) &tmp) ==
FAILURE) {
+ /* XXX we onyl catch the 1st tag of it's kind! */
+ add_assoc_stringl(info,markername,buffer,length,1);
+ }
efree(buffer);
}