Diff for /embedaddon/php/ext/standard/image.c between versions 1.1.1.3 and 1.1.1.4.2.1

version 1.1.1.3, 2013/07/22 01:32:05 version 1.1.1.4.2.1, 2013/10/14 08:17:38
Line 31 Line 31
 #endif  #endif
 #include "php_image.h"  #include "php_image.h"
   
 #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)  
 #include "zlib.h"  #include "zlib.h"
 #endif  
   
 /* file type markers */  /* file type markers */
 PHPAPI const char php_sig_gif[3] = {'G', 'I', 'F'};  PHPAPI const char php_sig_gif[3] = {'G', 'I', 'F'};
Line 81  PHP_MINIT_FUNCTION(imagetypes) Line 79  PHP_MINIT_FUNCTION(imagetypes)
         REGISTER_LONG_CONSTANT("IMAGETYPE_JP2",     IMAGE_FILETYPE_JP2,     CONST_CS | CONST_PERSISTENT);          REGISTER_LONG_CONSTANT("IMAGETYPE_JP2",     IMAGE_FILETYPE_JP2,     CONST_CS | CONST_PERSISTENT);
         REGISTER_LONG_CONSTANT("IMAGETYPE_JPX",     IMAGE_FILETYPE_JPX,     CONST_CS | CONST_PERSISTENT);          REGISTER_LONG_CONSTANT("IMAGETYPE_JPX",     IMAGE_FILETYPE_JPX,     CONST_CS | CONST_PERSISTENT);
         REGISTER_LONG_CONSTANT("IMAGETYPE_JB2",     IMAGE_FILETYPE_JB2,     CONST_CS | CONST_PERSISTENT);          REGISTER_LONG_CONSTANT("IMAGETYPE_JB2",     IMAGE_FILETYPE_JB2,     CONST_CS | CONST_PERSISTENT);
 #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)  
         REGISTER_LONG_CONSTANT("IMAGETYPE_SWC",     IMAGE_FILETYPE_SWC,     CONST_CS | CONST_PERSISTENT);          REGISTER_LONG_CONSTANT("IMAGETYPE_SWC",     IMAGE_FILETYPE_SWC,     CONST_CS | CONST_PERSISTENT);
 #endif    
         REGISTER_LONG_CONSTANT("IMAGETYPE_IFF",     IMAGE_FILETYPE_IFF,     CONST_CS | CONST_PERSISTENT);          REGISTER_LONG_CONSTANT("IMAGETYPE_IFF",     IMAGE_FILETYPE_IFF,     CONST_CS | CONST_PERSISTENT);
         REGISTER_LONG_CONSTANT("IMAGETYPE_WBMP",    IMAGE_FILETYPE_WBMP,    CONST_CS | CONST_PERSISTENT);          REGISTER_LONG_CONSTANT("IMAGETYPE_WBMP",    IMAGE_FILETYPE_WBMP,    CONST_CS | CONST_PERSISTENT);
         REGISTER_LONG_CONSTANT("IMAGETYPE_JPEG2000",IMAGE_FILETYPE_JPC,     CONST_CS | CONST_PERSISTENT); /* keep alias */          REGISTER_LONG_CONSTANT("IMAGETYPE_JPEG2000",IMAGE_FILETYPE_JPC,     CONST_CS | CONST_PERSISTENT); /* keep alias */
Line 112  static struct gfxinfo *php_handle_gif (php_stream * st Line 108  static struct gfxinfo *php_handle_gif (php_stream * st
         result->width    = (unsigned int)dim[0] | (((unsigned int)dim[1])<<8);          result->width    = (unsigned int)dim[0] | (((unsigned int)dim[1])<<8);
         result->height   = (unsigned int)dim[2] | (((unsigned int)dim[3])<<8);          result->height   = (unsigned int)dim[2] | (((unsigned int)dim[3])<<8);
         result->bits     = dim[4]&0x80 ? ((((unsigned int)dim[4])&0x07) + 1) : 0;          result->bits     = dim[4]&0x80 ? ((((unsigned int)dim[4])&0x07) + 1) : 0;
        result->channels = 3; /* allways */        result->channels = 3; /* always */
   
         return result;          return result;
 }  }
Line 188  static unsigned long int php_swf_get_bits (unsigned ch Line 184  static unsigned long int php_swf_get_bits (unsigned ch
 }  }
 /* }}} */  /* }}} */
   
 #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)  
 /* {{{ php_handle_swc  /* {{{ php_handle_swc
  */   */
 static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)  static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)
Line 259  static struct gfxinfo *php_handle_swc(php_stream * str Line 254  static struct gfxinfo *php_handle_swc(php_stream * str
         return result;          return result;
 }  }
 /* }}} */  /* }}} */
 #endif  
   
 /* {{{ php_handle_swf  /* {{{ php_handle_swf
  */   */
Line 1318  static void php_getimagesize_from_stream(php_stream *s Line 1312  static void php_getimagesize_from_stream(php_stream *s
                         result = php_handle_swf(stream TSRMLS_CC);                          result = php_handle_swf(stream TSRMLS_CC);
                         break;                          break;
                 case IMAGE_FILETYPE_SWC:                  case IMAGE_FILETYPE_SWC:
 #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)  
                         result = php_handle_swc(stream TSRMLS_CC);                          result = php_handle_swc(stream TSRMLS_CC);
 #else  
                         php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled");  
 #endif  
                         break;                          break;
                 case IMAGE_FILETYPE_PSD:                  case IMAGE_FILETYPE_PSD:
                         result = php_handle_psd(stream TSRMLS_CC);                          result = php_handle_psd(stream TSRMLS_CC);

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>