iliaa Tue Nov 12 11:14:18 2002 EDT
Modified files:
/php4/ext/standard image.c
Log:
Data manipulation (for big endian transformation) should occur after the
data has been read from file.
Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.71 php4/ext/standard/image.c:1.72
--- php4/ext/standard/image.c:1.71 Thu Nov 7 22:04:23 2002
+++ php4/ext/standard/image.c Tue Nov 12 11:14:18 2002
@@ -16,7 +16,7 @@
| Marcus Boerger <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.71 2002/11/08 03:04:23 iliaa Exp $ */
+/* $Id: image.c,v 1.72 2002/11/12 16:14:18 iliaa Exp $ */
/*
* Based on Daniel Schmitt's imageinfo.c which carried the following
* Copyright notice.
@@ -174,14 +174,14 @@
result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo));
php_stream_read(stream, temp, sizeof(temp));
-
+ php_stream_read(stream, (char*) &dim, sizeof(dim));
+
#ifdef WORDS_BIGENDIAN
dim.in_width = (dim.in_width & 0x000000FF) << 24 | (dim.in_width & 0x0000FF00)
<< 8 | (dim.in_width & 0x00FF0000) >> 8 | (dim.in_width & 0xFF000000) >> 24;
dim.in_height = (dim.in_height & 0x000000FF) << 24 | (dim.in_height &
0x0000FF00) << 8 | (dim.in_height & 0x00FF0000) >> 8 | (dim.in_height & 0xFF000000) >>
24;
dim.bits = (dim.bits & 0x00FF) << 8 | (dim.bits & 0xFF00) >> 8;
#endif
- php_stream_read(stream, (char*) &dim, sizeof(dim));
result->width = dim.in_width;
result->height = dim.in_height;
result->bits = dim.bits;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php