cvs: php4 /ext/standard image.c
| From: | Marcus B�rger | Date: | Tue, 25 Jun 2002 21:22:14 +0000 |
| Subject: | cvs: php4 /ext/standard image.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12515@lists.php.net to get a copy of this message | ||
helly Tue Jun 25 17:22:14 2002 EDT
Modified files:
/php4/ext/standard image.c
Log:
bits/channels for gif
Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.62 php4/ext/standard/image.c:1.63
--- php4/ext/standard/image.c:1.62 Mon Jun 24 18:00:22 2002
+++ php4/ext/standard/image.c Tue Jun 25 17:22:14 2002
@@ -16,7 +16,7 @@
| Marcus Boerger <helly@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.62 2002/06/24 22:00:22 helly Exp $ */
+/* $Id: image.c,v 1.63 2002/06/25 21:22:14 helly Exp $ */
/*
* Based on Daniel Schmitt's imageinfo.c which carried the following
* Copyright notice.
@@ -117,9 +117,11 @@
php_stream_read(stream, a, sizeof(a)); /* fread(a, sizeof(a), 1, fp); */
result->height = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
-
- result->bits = 0;
- result->channels = 0;
+
+ php_stream_read(stream, a, 1);
+
+ result->bits = a[0]&0x80 ? ((a[0]&0x07) + 1) : 0;
+ result->channels = 3; /* allways */
return result;
}