bjori Sun Jun 25 20:51:31 2006 UTC
Modified files:
/php-src/ext/standard image.c
Log:
Fixed image_type_to_extension()
Added support for IMAGETYPE_JPX & IMAGETYPE_JB2
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/image.c?r1=1.123&r2=1.124&diff_format=u
Index: php-src/ext/standard/image.c
diff -u php-src/ext/standard/image.c:1.123 php-src/ext/standard/image.c:1.124
--- php-src/ext/standard/image.c:1.123 Fri Apr 28 19:03:57 2006
+++ php-src/ext/standard/image.c Sun Jun 25 20:51:31 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.123 2006/04/28 19:03:57 fmk Exp $ */
+/* $Id: image.c,v 1.124 2006/06/25 20:51:31 bjori Exp $ */
#include "php.h"
#include <stdio.h>
@@ -1148,29 +1148,58 @@
switch (image_type) {
case IMAGE_FILETYPE_GIF:
temp = ".gif";
+ break;
+
case IMAGE_FILETYPE_JPEG:
temp = ".jpeg";
+ break;
+
case IMAGE_FILETYPE_PNG:
temp = ".png";
+ break;
+
case IMAGE_FILETYPE_SWF:
case IMAGE_FILETYPE_SWC:
temp = ".swf";
+ break;
+
case IMAGE_FILETYPE_PSD:
temp = ".psd";
+ break;
+
case IMAGE_FILETYPE_BMP:
case IMAGE_FILETYPE_WBMP:
temp = ".bmp";
+ break;
+
case IMAGE_FILETYPE_TIFF_II:
case IMAGE_FILETYPE_TIFF_MM:
temp = ".tiff";
+ break;
+
case IMAGE_FILETYPE_IFF:
temp = ".iff";
+ break;
+
case IMAGE_FILETYPE_JPC:
temp = ".jpc";
+ break;
+
case IMAGE_FILETYPE_JP2:
temp = ".jp2";
+ break;
+
+ case IMAGE_FILETYPE_JPX:
+ temp = ".jpx";
+ break;
+
+ case IMAGE_FILETYPE_JB2:
+ temp = ".jb2";
+ break;
+
case IMAGE_FILETYPE_XBM:
temp = ".xbm";
+ break;
}
if (temp) {
RETURN_ASCII_STRING(temp + !inc_dot, 1);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php