[PHP-CVS] svn: /SVNROOT/ global_avail

2013-10-08 Thread Pierre Joye
pajoye   Tue, 08 Oct 2013 13:33:08 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=331730

Log:
- ab karma

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2013-10-08 11:59:38 UTC (rev 331729)
+++ SVNROOT/global_avail2013-10-08 13:33:08 UTC (rev 331730)
@@ -411,8 +411,8 @@
 avail|bcarlyon,derick|web/bugtracker

 # php-internals-win karma
-avail|szarkos,pajoye,rrichards,auroraeosrose|php/php-internals-win
-avail|pajoye,guilhermeblanco,auroraeosrose,rrichards,kalle,sascham78,szarkos|web/windows.git
+avail|szarkos,pajoye,rrichards,auroraeosrose,ab|php/php-internals-win
+avail|pajoye,guilhermeblanco,auroraeosrose,rrichards,kalle,sascham78,szarkos,ab|web/windows.git
 avail|szarkos,ab|web/rmtools.git

 # php-benchmarks karma

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /SVNROOT/ global_avail

2013-10-02 Thread Pierre Joye
pajoye   Wed, 02 Oct 2013 06:16:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=331642

Log:
- anaotol access

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2013-10-02 00:55:37 UTC (rev 331641)
+++ SVNROOT/global_avail2013-10-02 06:16:13 UTC (rev 331642)
@@ -109,7 +109,7 @@
 avail|grossolini|web/wiki.git

 # access to the pecl website etc
-avail|dufuz,pajoye,wez,pollita,tal,mj,helly,john,iliaa,edink,jan,derick,jon,cellog,philip,jani,johannes,sfox,gloob,till,tyrael,jedibc|web/pecl.git,pecl
+avail|dufuz,pajoye,wez,pollita,tal,mj,helly,john,iliaa,edink,jan,derick,jon,cellog,philip,jani,johannes,sfox,gloob,till,tyrael,jedibc,ab|web/pecl.git,pecl

 # access to the newly cut pecl4win website
 avail|edink,derick|web/pecl4win
@@ -413,7 +413,7 @@
 # php-internals-win karma
 avail|szarkos,pajoye,rrichards,auroraeosrose|php/php-internals-win
 
avail|pajoye,guilhermeblanco,auroraeosrose,rrichards,kalle,sascham78,szarkos|web/windows.git
-avail|szarkos|web/rmtools.git
+avail|szarkos,ab|web/rmtools.git

 # php-benchmarks karma
 avail|nlopess,pbiggar,olafurw,hjalle|php/php-benchmarks

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] com php-src: Save a TSRMLS_FETCH() for zval_ptr_dtor in executor: Zend/zend_execute.c Zend/zend_execute.h Zend/zend_execute_API.c Zend/zend_generators.c Zend/zend_vm_def.h Zend/zend_vm_e

2013-09-14 Thread Pierre Joye
Good catch! Kill them all if you can ;-)
On Sep 14, 2013 2:05 PM, Nikita Popov ni...@php.net wrote:

 Commit:bdfa03d79df529b555e2d25da288b50647e7c537
 Author:Nikita Popov ni...@php.net Sat, 14 Sep 2013 14:40:48
 +0200
 Parents:   8748e146b98fb79e66e3be40b211005e36031d64
 Branches:  master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=bdfa03d79df529b555e2d25da288b50647e7c537

 Log:
 Save a TSRMLS_FETCH() for zval_ptr_dtor in executor

 This gives me about 9% improvement on Zend/bench.php for a zts build.

 Changed paths:
   M  Zend/zend_execute.c
   M  Zend/zend_execute.h
   M  Zend/zend_execute_API.c
   M  Zend/zend_generators.c
   M  Zend/zend_vm_def.h
   M  Zend/zend_vm_execute.h


 Diff:
 diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
 index 63ecbe4..c79a551 100644
 --- a/Zend/zend_execute.c
 +++ b/Zend/zend_execute.c
 @@ -94,7 +94,7 @@ static zend_always_inline void
 zend_pzval_unlock_free_func(zval *z TSRMLS_DC)
  }

  #undef zval_ptr_dtor
 -#define zval_ptr_dtor(pzv) i_zval_ptr_dtor(*(pzv)  ZEND_FILE_LINE_CC)
 +#define zval_ptr_dtor(pzv) i_zval_ptr_dtor(*(pzv) ZEND_FILE_LINE_CC
 TSRMLS_CC)

  #define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f, 1 TSRMLS_CC)
  #define PZVAL_UNLOCK_EX(z, f, u) zend_pzval_unlock_func(z, f, u TSRMLS_CC)
 @@ -1500,7 +1500,7 @@ void zend_clean_and_cache_symbol_table(HashTable
 *symbol_table TSRMLS_DC) /* {{{
  }
  /* }}} */

 -static zend_always_inline void
 i_free_compiled_variables(zend_execute_data *execute_data) /* {{{ */
 +static zend_always_inline void
 i_free_compiled_variables(zend_execute_data *execute_data TSRMLS_DC) /* {{{
 */
  {
 zval ***cv = EX_CV_NUM(execute_data, 0);
 zval ***end = cv + EX(op_array)-last_var;
 @@ -1513,9 +1513,9 @@ static zend_always_inline void
 i_free_compiled_variables(zend_execute_data *exec
  }
  /* }}} */

 -void zend_free_compiled_variables(zend_execute_data *execute_data) /* {{{
 */
 +void zend_free_compiled_variables(zend_execute_data *execute_data
 TSRMLS_DC) /* {{{ */
  {
 -   i_free_compiled_variables(execute_data);
 +   i_free_compiled_variables(execute_data TSRMLS_CC);
  }
  /* }}} */

 diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
 index ff07587..b68a82e 100644
 --- a/Zend/zend_execute.h
 +++ b/Zend/zend_execute.h
 @@ -71,18 +71,14 @@ ZEND_API int zend_eval_stringl_ex(char *str, int
 str_len, zval *retval_ptr, char
  ZEND_API char * zend_verify_arg_class_kind(const zend_arg_info
 *cur_arg_info, ulong fetch_type, const char **class_name, zend_class_entry
 **pce TSRMLS_DC);
  ZEND_API int zend_verify_arg_error(int error_type, const zend_function
 *zf, zend_uint arg_num, const char *need_msg, const char *need_kind, const
 char *given_msg, const char *given_kind TSRMLS_DC);

 -static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr
 ZEND_FILE_LINE_DC)
 +static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr
 ZEND_FILE_LINE_DC TSRMLS_DC)
  {
 if (!Z_DELREF_P(zval_ptr)) {
 -   TSRMLS_FETCH();
 -
 ZEND_ASSERT(zval_ptr != EG(uninitialized_zval));
 GC_REMOVE_ZVAL_FROM_BUFFER(zval_ptr);
 zval_dtor(zval_ptr);
 efree_rel(zval_ptr);
 } else {
 -   TSRMLS_FETCH();
 -
 if (Z_REFCOUNT_P(zval_ptr) == 1) {
 Z_UNSET_ISREF_P(zval_ptr);
 }
 @@ -295,7 +291,7 @@ static zend_always_inline void
 zend_vm_stack_clear_multiple(int nested TSRMLS_DC
 while (p != end) {
 zval *q = (zval *) *(--p);
 *p = NULL;
 -   i_zval_ptr_dtor(q ZEND_FILE_LINE_CC);
 +   i_zval_ptr_dtor(q ZEND_FILE_LINE_CC TSRMLS_CC);
 }
 if (nested) {
 EG(argument_stack)-top = p;
 @@ -394,7 +390,7 @@ ZEND_API zval **zend_get_zval_ptr_ptr(int op_type,
 const znode_op *node, const z
  ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS);

  void zend_clean_and_cache_symbol_table(HashTable *symbol_table TSRMLS_DC);
 -void zend_free_compiled_variables(zend_execute_data *execute_data);
 +void zend_free_compiled_variables(zend_execute_data *execute_data
 TSRMLS_DC);

  #define CACHED_PTR(num) \
 EG(active_op_array)-run_time_cache[(num)]
 diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
 index d65308f..779e6d8 100644
 --- a/Zend/zend_execute_API.c
 +++ b/Zend/zend_execute_API.c
 @@ -423,7 +423,8 @@ ZEND_API zend_bool zend_is_executing(TSRMLS_D) /* {{{
 */

  ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
  {
 -   i_zval_ptr_dtor(*zval_ptr ZEND_FILE_LINE_RELAY_CC);
 +   TSRMLS_FETCH();
 +   i_zval_ptr_dtor(*zval_ptr ZEND_FILE_LINE_RELAY_CC TSRMLS_CC);
  }
  /* }}} */

 diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
 index c6b211a..c55dc67 100644
 --- a/Zend/zend_generators.c
 +++ b/Zend/zend_generators.c
 @@ -46,7 +46,7 @@ ZEND_API void zend_generator_close(zend_generator
 *generator, 

Re: [PHP-CVS] com php-src: Provide more macros for handling of interned strings: Zend/zend.h Zend/zend_API.c Zend/zend_builtin_functions.c Zend/zend_compile.c Zend/zend_constants.c Zend/zend_execute.c

2013-09-13 Thread Pierre Joye
Hi!

On Sep 13, 2013 10:46 AM, Nikita Popov ni...@php.net wrote:

 Commit:96b1c2145c2cd5e616dea191648c2d73af0239c9
 Author:Nikita Popov ni...@php.net Fri, 13 Sep 2013 18:45:02
+0200
 Parents:   d2950ac2791cd03559a58e78f5cd626283b9ee4d
 Branches:  master

 Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=96b1c2145c2cd5e616dea191648c2d73af0239c9

 Log:
 Provide more macros for handling of interned strings

  * str_erealloc behaves like erealloc for normal strings, but will
use emalloc+memcpy for interned strings.
  * str_estrndup behaves like estrndup for normal strings, but will
not copy interned strings.
  * str_strndup behaves like zend_strndup for normal strings, but
will not copy interned strings.
  * str_efree_rel behaves like efree_rel for normal strings, but
will not free interned strings.
  * str_hash will return INTERNED_HASH for interned strings and
compute it using zend_hash_func for normal strings.

Can you notes in upgrading.internals please?

Thanks!


[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-09-09 Thread Pierre Joye
Commit:d32194172ad6dba22378609324b6d3ae2bcff41c
Author:unknown paj...@php.net Mon, 9 Sep 2013 11:56:58 +0200
Parents:   df711f2c56c74609ec5865fab5fee247b175c654 
b54b6e30a4e46d9dd1f1bf0cbc0d4539c0f7d51d
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d32194172ad6dba22378609324b6d3ae2bcff41c

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  ensure that the defined interpolation method is used by the generic scaling 
functions

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: ensure that the defined interpolation method is used by the generic scaling functions: NEWS ext/gd/libgd/gd_interpolation.c

2013-09-09 Thread Pierre Joye
Commit:b54b6e30a4e46d9dd1f1bf0cbc0d4539c0f7d51d
Author:unknown paj...@php.net Mon, 9 Sep 2013 11:56:05 +0200
Parents:   8d860c121810d6a10380241a0a51387966a503ca
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b54b6e30a4e46d9dd1f1bf0cbc0d4539c0f7d51d

Log:
ensure that the defined interpolation method is used by the generic scaling 
functions

Changed paths:
  M  NEWS
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/NEWS b/NEWS
index 817f9f7..8655571 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,9 @@ PHP   
 NEWS
   . Fixed bug #65564 (stack-buffer-overflow in DateTimeZone stuff caught
 by AddressSanitizer). (Remi).
 
+- GD
+  . Ensure that the defined interpolation method is used with the generic 
scaling methods (Pierre)
+
 - OPCache:
   . Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs 
ZEND_MM_ALIGNMENT=4).
 (Terry Ellison)
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index e3247a7..3643535 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1065,6 +1065,7 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, 
const unsigned int src_widt
if (tmp_im == NULL) {
return NULL;
}
+   gdImageSetInterpolationMethod(tmp_im, src-interpolation_id);
_gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, 
src_height);
 
dst = gdImageCreateTrueColor(new_width, new_height);
@@ -1072,6 +1073,7 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, 
const unsigned int src_widt
gdFree(tmp_im);
return NULL;
}
+   gdImageSetInterpolationMethod(dst, src-interpolation_id);
_gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height);
gdFree(tmp_im);
 
@@ -1086,8 +1088,9 @@ gdImagePtr Scale(const gdImagePtr src, const unsigned int 
src_width, const unsig
if (tmp_im == NULL) {
return NULL;
}
-   _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, 
src_height);
+   gdImageSetInterpolationMethod(tmp_im, src-interpolation_id);
 
+   _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, 
src_height);
_gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height);
 
gdFree(tmp_im);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix #65070, bgcolor does not use the same format as the input image with imagerotate: NEWS

2013-06-20 Thread Pierre Joye
Commit:c65d663aefd27e39006b9c20a665893aa5265ed4
Author:Pierre Joye pierre@gmail.com Thu, 20 Jun 2013 22:22:07 
+0200
Parents:   876b474c7d1e6d7f4b9b1d5b09aca71825c4661d
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c65d663aefd27e39006b9c20a665893aa5265ed4

Log:
fix #65070, bgcolor does not use the same format as the input image with 
imagerotate

Bugs:
https://bugs.php.net/65070

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 653a64a..d8b74c2 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ PHP 
   NEWS
 - CLI server:
   . Fixed bug #65066 (Cli server not responsive when responding with 422 http
 status code). (Adam)
+- GD
+  . Fixed #65070 (bgcolor does not use the same format as the input image with
+imagerotate). (Pierre)
 
 20 Jun 2013, PHP 5.5.0


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix #65070, bgcolor does not use the same format as the input image with imagerotate: ext/gd/libgd/gd.c ext/gd/libgd/gd_interpolation.c

2013-06-20 Thread Pierre Joye
Commit:07e52857b5f7a65c1552628e14a8a6aeeea24508
Author:Pierre Joye pierre@gmail.com Thu, 20 Jun 2013 22:19:33 
+0200
Parents:   0a6ec7a2c96589a6a7922137907173f3640c3e9c
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=07e52857b5f7a65c1552628e14a8a6aeeea24508

Log:
fix #65070, bgcolor does not use the same format as the input image with 
imagerotate

Bugs:
https://bugs.php.net/65070

Changed paths:
  M  ext/gd/libgd/gd.c
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 81eba52..7ed6617 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -3044,7 +3044,7 @@ int gdImagePaletteToTrueColor(gdImagePtr src)
for (x = 0; x  sx; x++) {
const unsigned char c = *(src_row + x);
if (c == src-transparent) {
-   *(dst_row + x) = gdTrueColorAlpha(0, 0, 
0, 127);;
+   *(dst_row + x) = gdTrueColorAlpha(0, 0, 
0, 127);
} else {
*(dst_row + x) = 
gdTrueColorAlpha(src-red[c], src-green[c], src-blue[c], src-alpha[c]);
}
@@ -3061,6 +3061,12 @@ int gdImagePaletteToTrueColor(gdImagePtr src)
src-pixels = NULL;
src-alphaBlendingFlag = 0;
src-saveAlphaFlag = 1;
+
+   if (src-transparent = 0) {
+   const unsigned char c = src-transparent;
+   src-transparent =  gdTrueColorAlpha(src-red[c], 
src-green[c], src-blue[c], src-alpha[c]);
+   }
+
return 1;
 
 clean_on_error:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 9652a3a..e3247a7 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1674,13 +1674,6 @@ gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, 
const float degrees, co
unsigned int i;
gdImagePtr dst;
 
-   /* impact perf a bit, but not that much. Implementation for palette
-  images can be done at a later point.
-   */
-   if (src-trueColor == 0) {
-   gdImagePaletteToTrueColor(src);
-   }
-
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
return NULL;
@@ -1736,12 +1729,6 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const 
float degrees, const int b
f_slop_x  f_slop_y ? 
gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)
: 0;
 
-   /* impact perf a bit, but not that much. Implementation for palette
-  images can be done at a later point.
-   */
-   if (src-trueColor == 0) {
-   gdImagePaletteToTrueColor(src);
-   }
 
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
@@ -1796,13 +1783,6 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const 
float degrees, const int
unsigned int src_offset_x, src_offset_y;
gdImagePtr dst;
 
-   /* impact perf a bit, but not that much. Implementation for palette
-  images can be done at a later point.
-   */
-   if (src-trueColor == 0) {
-   gdImagePaletteToTrueColor(src);
-   }
-
dst = gdImageCreateTrueColor(new_width, new_height);
if (dst == NULL) {
return NULL;
@@ -1922,13 +1902,6 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, 
const float degrees, const
unsigned int i;
gdImagePtr dst;
 
-   /* impact perf a bit, but not that much. Implementation for palette
-  images can be done at a later point.
-   */
-   if (src-trueColor == 0) {
-   gdImagePaletteToTrueColor(src);
-   }
-
dst = gdImageCreateTrueColor(new_width, new_height);
 
if (dst == NULL) {
@@ -2177,11 +2150,21 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, 
const float degrees, const
 gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, 
int bgcolor)
 {
const int angle_rounded = (int)floor(angle * 100);
-   
+
if (bgcolor  0) {
return NULL;
}
 
+   /* impact perf a bit, but not that much. Implementation for palette
+  images can be done at a later point.
+   */
+   if (src-trueColor == 0) {
+   if (bgcolor = 0) {
+   bgcolor =  gdTrueColorAlpha(src-red[bgcolor], 
src-green[bgcolor], src-blue[bgcolor], src-alpha[bgcolor]);
+   }
+   gdImagePaletteToTrueColor(src);
+   }
+
/* no interpolation needed here */
switch (angle_rounded) {
case 9000:


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-06-20 Thread Pierre Joye
Commit:a1d0a869be09a63d74eb056e0cead8126270106a
Author:Pierre Joye pierre@gmail.com Thu, 20 Jun 2013 22:32:52 
+0200
Parents:   d5bfb0a34ecaadb3cfc7149407d3297aa16a 
c65d663aefd27e39006b9c20a665893aa5265ed4
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=a1d0a869be09a63d74eb056e0cead8126270106a

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix #65070, bgcolor does not use the same format as the input image with 
imagerotate
  fix #65070, bgcolor does not use the same format as the input image with 
imagerotate
  Fix the spelling of the php_cli_server_http_response_status_code_pair typedef.
  Change the search in get_status_string() to correctly handle unknown codes.
  Update git rules (5.5 is stable, 5.3 sec only)
  skip test for bug #64936 when tokenizer not built
  Bump version
  Update credits
  Merge NEWS from PHP 5.4 branch
  Reorder NEWS for PHP 5.5.0 final

Conflicts:
configure.in
ext/gd/libgd/gd_interpolation.c
main/php_version.h

Bugs:
https://bugs.php.net/65070
https://bugs.php.net/64936

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:
diff --cc ext/gd/libgd/gd_interpolation.c
index 2641f97,e3247a7..b6e7c69
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@@ -1735,17 -1729,7 +1728,11 @@@ gdImagePtr gdImageRotateGeneric(gdImage
f_slop_x  f_slop_y ? 
gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)
: 0;
  
+ 
 +  if (bgColor  0) {
 +  return NULL;
 +  }
 +
-   /* impact perf a bit, but not that much. Implementation for palette
-  images can be done at a later point.
-   */
-   if (src-trueColor == 0) {
-   gdImagePaletteToTrueColor(src);
-   }
- 
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
return NULL;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: add notes about opcache windows issue and migration from APC: UPGRADING

2013-06-19 Thread Pierre Joye
Commit:0a6ec7a2c96589a6a7922137907173f3640c3e9c
Author:Pierre Joye pierre@gmail.com Wed, 19 Jun 2013 17:57:08 
+0200
Parents:   2873b5b6eb4acb0c7b7e355936e2ac16d31b17b9
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0a6ec7a2c96589a6a7922137907173f3640c3e9c

Log:
add notes about opcache windows issue and migration from APC

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index 6c6368b..7bd0b0c 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -385,6 +385,10 @@ PHP 5.5 UPGRADE NOTES
 - opcache.preferred_memory_model (default )
 - opcache.protect_memory (default 0)
 - opcache.mmap_base (Windows-only)
+ - If APC or WinCache was used before, the user cache APIs can be replaced by:
+- APCu, all supported OSes (http://pecl.php.net/package/APCu, Windows: 
http://windows.php.net/downloads/pecl/releases/apcu/)
+   - WinCache, windows only (http://pecl.php.net/package/WinCache), a 
version with the ability to use only the user
+ cache will be released shortly after 5.5.0 final
 
 
 11. Windows Support
@@ -392,6 +396,18 @@ PHP 5.5 UPGRADE NOTES
 
 - Apache 2.4 handler is supported as of PHP 5.5.0
 
+- OpCache
+  Error like 'unable to reattach to base address' could happen in many common 
setups.
+  It is due to some technical and design restriction in the engine and cannot 
be fixed 
+  easily before 5.5.0 final was released.
+  
+  A possible fix is to tweak the opcache.mmap_base INI setting by forcing the 
1st address 
+  to be tried.
+  
+  For x86 version, the following addreses can be tried:
+   .  0x2000, 0x2100, 0x3000, 0x3100, 0x5000
+  and for x64 (still expiremental):
+   . 0x1000, 0x2000, 0x3000, 
0x7000
 
 
 12. Other Changes


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix #64898imagerotate is broken with bilinear interpolation: ext/gd/libgd/gd_interpolation.c

2013-05-27 Thread Pierre Joye
Commit:2f01e06786c6f4b2479fdb728bd26062d07208e0
Author:Pierre Joye pierre@gmail.com Mon, 27 May 2013 09:21:41 
+0200
Parents:   b262787ef9861a3a61f46ba4031f5aa6659eb7fb
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2f01e06786c6f4b2479fdb728bd26062d07208e0

Log:
fix #64898imagerotate is broken with bilinear interpolation

Bugs:
https://bugs.php.net/64898

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 6c5549e..bcd76e9 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1830,18 +1830,18 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const 
float degrees, const int
const gdFixed f_w4 = gd_mulfx(f_f, f_g);
 
if (n  src_w - 1) {
-   src_offset_x = m + 1;
-   src_offset_y = n;
+   src_offset_x = n + 1;
+   src_offset_y = m;
}
 
if (m  src_h-1) {
-   src_offset_x = m;
-   src_offset_y = n + 1;
+   src_offset_x = n;
+   src_offset_y = m + 1;
}
 
if (!((n = src_w-1) || (m = src_h-1))) {
-   src_offset_x = m + 1;
-   src_offset_y = n + 1;
+   src_offset_x = n + 1;
+   src_offset_y = m + 1;
}
{
const int pixel1 = 
src-tpixels[src_offset_y][src_offset_x];


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-05-27 Thread Pierre Joye
Commit:8059ec1832d11e117a956b32a12c9a9464e466a5
Author:Pierre Joye pierre@gmail.com Mon, 27 May 2013 09:22:00 
+0200
Parents:   6e081f8a821376281632bce87f99110eb4dc4ac4 
2f01e06786c6f4b2479fdb728bd26062d07208e0
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8059ec1832d11e117a956b32a12c9a9464e466a5

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix #64898imagerotate is broken with bilinear interpolation

Bugs:
https://bugs.php.net/64898

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: other fix for #64214, unmodified file may not have old fp set, causing other possible crashes: ext/phar/zip.c

2013-05-17 Thread Pierre Joye
Commit:3eb1745643e6774dcd589705bf566516561d1cff
Author:Pierre Joye pierre@gmail.com Fri, 17 May 2013 11:45:13 
+0200
Parents:   86db5fb4c2b7199dc862dfce99c345c49305ba8a
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3eb1745643e6774dcd589705bf566516561d1cff

Log:
other fix for #64214, unmodified file may not have old fp set, causing other 
possible crashes

Bugs:
https://bugs.php.net/64214

Changed paths:
  M  ext/phar/zip.c


Diff:
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index c8057e3..6ba745e 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -937,10 +937,11 @@ is_compressed:
PHAR_SET_32(local.uncompsize, entry-uncompressed_filesize);
PHAR_SET_32(central.compsize, entry-compressed_filesize);
PHAR_SET_32(local.compsize, entry-compressed_filesize);
-
-   if (-1 == php_stream_seek(p-old, entry-offset_abs, SEEK_SET)) 
{
-   spprintf(p-error, 0, unable to seek to start of file 
\%s\ while creating zip-based phar \%s\, entry-filename, 
entry-phar-fname);
-   return ZEND_HASH_APPLY_STOP;
+   if (p-old) {
+   if (-1 == php_stream_seek(p-old, entry-offset_abs, 
SEEK_SET)) {
+   spprintf(p-error, 0, unable to seek to start 
of file \%s\ while creating zip-based phar \%s\, entry-filename, 
entry-phar-fname);
+   return ZEND_HASH_APPLY_STOP;
+   }
}
}
 not_compressed:


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: entry for #64214: NEWS

2013-05-17 Thread Pierre Joye
Commit:46b05bc57aee7a24f87a31a079f9076f4870b780
Author:Pierre Joye pierre@gmail.com Fri, 17 May 2013 11:49:13 
+0200
Parents:   3eb1745643e6774dcd589705bf566516561d1cff
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=46b05bc57aee7a24f87a31a079f9076f4870b780

Log:
entry for #64214

Bugs:
https://bugs.php.net/64214

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index eae701e..ce86bb2 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,10 @@ PHP  
  NEWS
   . Fixed bug #64821 (Custom Exception crash when internal properties 
overridden).
 (Anatol)
 
+- Phar
+  . Fixed bug #64214 (PHAR PHPTs intermittently crash when run on DFS, SMB or 
with
+non std tmp dir). (Pierre)
+
 09 May 2013, PHP 5.3.25
 
 - Core:


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Add optional second arg to unserialize(): ext/standard/basic_functions.c ext/standard/tests/serialize/serialization_error_001.phpt ext/standard/tests/serialize/unserialize_c

2013-05-16 Thread Pierre Joye
hi Sara!

Please add a note to UPGRADING as well.

Thanks!
--
Cheers,

On Fri, May 17, 2013 at 12:18 AM, Sara Golemon poll...@php.net wrote:
 Commit:cfd104582220d578ab1b78a5991065d038e1f931
 Author:Sara Golemon poll...@php.net Thu, 16 May 2013 14:37:36 
 -0700
 Parents:   bc656cde0453aa6de50812ba9edfc6f74c61ce37
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=cfd104582220d578ab1b78a5991065d038e1f931

 Log:
 Add optional second arg to unserialize()

 Returns the number of bytes consumed by reference for
 streaming unserialization.

 Actual unserialization behavior is not modified at all.

 The need for this came up while trying to parse SplDoublyLinkedList's
 serialization format which uses a non-standard stream of serialized values.

 Changed paths:
   M  ext/standard/basic_functions.c
   M  ext/standard/tests/serialize/serialization_error_001.phpt
   A  ext/standard/tests/serialize/unserialize_consumed.phpt
   M  ext/standard/var.c


 Diff:
 diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
 index 9c91404..1379117 100644
 --- a/ext/standard/basic_functions.c
 +++ b/ext/standard/basic_functions.c
 @@ -2679,6 +2679,7 @@ ZEND_END_ARG_INFO()

  ZEND_BEGIN_ARG_INFO(arginfo_unserialize, 0)
 ZEND_ARG_INFO(0, variable_representation)
 +   ZEND_ARG_INFO(1, consumed)
  ZEND_END_ARG_INFO()

  ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_usage, 0, 0, 0)
 diff --git a/ext/standard/tests/serialize/serialization_error_001.phpt 
 b/ext/standard/tests/serialize/serialization_error_001.phpt
 index da6f50c..c6c1751 100644
 --- a/ext/standard/tests/serialize/serialization_error_001.phpt
 +++ b/ext/standard/tests/serialize/serialization_error_001.phpt
 @@ -21,7 +21,7 @@ var_dump( unserialize() );

  //Test serialize with one more than the expected number of arguments
  var_dump( serialize(1,2) );
 -var_dump( unserialize(1,2) );
 +var_dump( unserialize(1,$x,2) );

  echo Done;
  ?
 @@ -31,12 +31,12 @@ echo Done;
  Warning: serialize() expects exactly 1 parameter, 0 given in %s on line 16
  NULL

 -Warning: unserialize() expects exactly 1 parameter, 0 given in %s on line 17
 +Warning: unserialize() expects at least 1 parameter, 0 given in %s on line 17
  bool(false)

  Warning: serialize() expects exactly 1 parameter, 2 given in %s on line 20
  NULL

 -Warning: unserialize() expects exactly 1 parameter, 2 given in %s on line 21
 +Warning: unserialize() expects at most 2 parameters, 3 given in %s on line 21
  bool(false)
  Done
 diff --git a/ext/standard/tests/serialize/unserialize_consumed.phpt 
 b/ext/standard/tests/serialize/unserialize_consumed.phpt
 new file mode 100644
 index 000..6cc11e2
 --- /dev/null
 +++ b/ext/standard/tests/serialize/unserialize_consumed.phpt
 @@ -0,0 +1,27 @@
 +--TEST--
 +Unserialization of partial strings
 +--FILE--
 +?php
 +$data = [123,4.56,true];
 +$ser = serialize($data);
 +$serlen = strlen($ser);
 +
 +$unser = unserialize($ser, $consumed);
 +echo Consume full string: ;
 +var_dump($serlen == $consumed);
 +echo Return original data: ;
 +var_dump($unser === $data);
 +
 +$ser .= junk\x01data;
 +$unser = unserialize($ser, $consumed);
 +echo Consume full string(junk): ;
 +var_dump($serlen == $consumed);
 +echo Return original data(junk): ;
 +var_dump($unser === $data);
 +
 +--EXPECT--
 +Consume full string: bool(true)
 +Return original data: bool(true)
 +Consume full string(junk): bool(true)
 +Return original data(junk): bool(true)
 +
 diff --git a/ext/standard/var.c b/ext/standard/var.c
 index f76a14c..4acc6f5 100644
 --- a/ext/standard/var.c
 +++ b/ext/standard/var.c
 @@ -945,7 +945,7 @@ PHP_FUNCTION(serialize)
  }
  /* }}} */

 -/* {{{ proto mixed unserialize(string variable_representation)
 +/* {{{ proto mixed unserialize(string variable_representation[, int 
 consumed])
 Takes a string representation of variable and recreates it */
  PHP_FUNCTION(unserialize)
  {
 @@ -953,8 +953,9 @@ PHP_FUNCTION(unserialize)
 int buf_len;
 const unsigned char *p;
 php_unserialize_data_t var_hash;
 +   zval *consumed = NULL;

 -   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, buf, 
 buf_len) == FAILURE) {
 +   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|z, buf, 
 buf_len, consumed) == FAILURE) {
 RETURN_FALSE;
 }

 @@ -973,6 +974,11 @@ PHP_FUNCTION(unserialize)
 RETURN_FALSE;
 }
 PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
 +
 +   if (consumed) {
 +   zval_dtor(consumed);
 +   ZVAL_LONG(consumed, ((char*)p) - buf);
 +   }
  }
  /* }}} */


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/phar/phar_object.c

2013-05-15 Thread Pierre Joye
Commit:42a186e22d6621dfb606fa2e562140faa08e8c99
Author:Pierre Joye pierre@gmail.com Tue, 14 May 2013 16:46:32 
+0200
Parents:   362402d7484725287b5eae23936b09e570d83d48 
7ec2e5314eb62d9cd2ef23e0b62445eb50cc23c0
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=42a186e22d6621dfb606fa2e562140faa08e8c99

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  more check for php_stream_fopen_tmpfile failure

Changed paths:
  MM  ext/phar/phar_object.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/phar/phar_object.c ext/phar/util.c

2013-05-15 Thread Pierre Joye
Commit:7ec2e5314eb62d9cd2ef23e0b62445eb50cc23c0
Author:Pierre Joye pierre@gmail.com Tue, 14 May 2013 16:45:56 
+0200
Parents:   f37c54ab276bc55339e4b8aa2b6f5caa88cb4b86 
ba1af298052cbef7329e330f2d3f9749b9be65bb
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7ec2e5314eb62d9cd2ef23e0b62445eb50cc23c0

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  more check for php_stream_fopen_tmpfile failure

Changed paths:
  MM  ext/phar/phar_object.c
  MM  ext/phar/util.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: php_stream_fopen_tmpfile may file, causing any following stream usage to crash: ext/phar/zip.c

2013-05-14 Thread Pierre Joye
Commit:533e636a62a1f1d5119f262f44c48097d7762735
Author:Pierre Joye pierre@gmail.com Tue, 14 May 2013 09:20:53 
+0200
Parents:   fe21accfb4913bf309f26894ae27e9ad34fb5260
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=533e636a62a1f1d5119f262f44c48097d7762735

Log:
php_stream_fopen_tmpfile may file, causing any following stream usage to crash

Changed paths:
  M  ext/phar/zip.c


Diff:
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index 33732fb..2d57c08 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -1122,6 +1122,10 @@ static int phar_zip_applysignature(phar_archive_data 
*phar, struct _phar_zip_pas
entry.fp = php_stream_fopen_tmpfile();
entry.fp_type = PHAR_MOD;
entry.is_modified = 1;
+   if (entry.fp == NULL) {
+   spprintf(pass-error, 0, phar error: unable to create 
temporary file for signature);
+   return FAILURE;
+   }
 
PHAR_SET_32(sigbuf, phar-sig_flags);
PHAR_SET_32(sigbuf + 4, signature_length);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: more check for php_stream_fopen_tmpfile failure: ext/phar/phar_object.c ext/phar/tar.c ext/phar/util.c ext/phar/zip.c

2013-05-14 Thread Pierre Joye
Commit:ba1af298052cbef7329e330f2d3f9749b9be65bb
Author:Pierre Joye pierre@gmail.com Tue, 14 May 2013 16:45:11 
+0200
Parents:   533e636a62a1f1d5119f262f44c48097d7762735
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ba1af298052cbef7329e330f2d3f9749b9be65bb

Log:
more check for php_stream_fopen_tmpfile failure

Changed paths:
  M  ext/phar/phar_object.c
  M  ext/phar/tar.c
  M  ext/phar/util.c
  M  ext/phar/zip.c


Diff:
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index eb6b4cf..6669209 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -1897,6 +1897,10 @@ PHP_METHOD(Phar, buildFromDirectory)
pass.count = 0;
pass.ret = return_value;
pass.fp = php_stream_fopen_tmpfile();
+   if (pass.fp == NULL) {
+   zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, 
phar \%s\ unable to create temporary file, phar_obj-arc.archive-fname);
+   return;
+   }
 
if (phar_obj-arc.archive-is_persistent  FAILURE == 
phar_copy_on_write((phar_obj-arc.archive) TSRMLS_CC)) {
zval_ptr_dtor(iteriter);
@@ -1977,6 +1981,10 @@ PHP_METHOD(Phar, buildFromIterator)
pass.ret = return_value;
pass.count = 0;
pass.fp = php_stream_fopen_tmpfile();
+   if (pass.fp == NULL) {
+   zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, 
phar \%s\: unable to create temporary file, phar_obj-arc.archive-fname);
+   return;
+   }
 
if (SUCCESS == spl_iterator_apply(obj, (spl_iterator_apply_func_t) 
phar_build, (void *) pass TSRMLS_CC)) {
phar_obj-arc.archive-ufp = pass.fp;
@@ -2308,6 +2316,10 @@ static zval *phar_convert_to_other(phar_archive_data 
*source, int convert, char
zend_get_hash_value, NULL, 0);
 
phar-fp = php_stream_fopen_tmpfile();
+   if (phar-fp == NULL) {
+   zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, 
unable to create temporary file);
+   return NULL;
+   }
phar-fname = source-fname;
phar-fname_len = source-fname_len;
phar-is_temporary_alias = source-is_temporary_alias;
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index f170335..0e60e3d 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -847,7 +847,10 @@ int phar_tar_setmetadata(zval *metadata, phar_entry_info 
*entry, char **error TS
entry-is_modified = 1;
entry-fp = php_stream_fopen_tmpfile();
entry-offset = entry-offset_abs = 0;
-
+   if (entry-fp == NULL) {
+   spprintf(error, 0, phar error: unable to create temporary 
file);
+   return -1;
+   }
if (entry-metadata_str.len != php_stream_write(entry-fp, 
entry-metadata_str.c, entry-metadata_str.len)) {
spprintf(error, 0, phar tar error: unable to write metadata to 
magic metadata file \%s\, entry-filename);
zend_hash_del((entry-phar-manifest), entry-filename, 
entry-filename_len);
@@ -949,7 +952,10 @@ int phar_tar_flush(phar_archive_data *phar, char 
*user_stub, long len, int defau
entry.filename = estrndup(.phar/alias.txt, 
sizeof(.phar/alias.txt)-1);
entry.filename_len = sizeof(.phar/alias.txt)-1;
entry.fp = php_stream_fopen_tmpfile();
-
+   if (entry.fp == NULL) {
+   spprintf(error, 0, phar error: unable to create 
temporary file);
+   return -1;
+   }
if (phar-alias_len != (int)php_stream_write(entry.fp, 
phar-alias, phar-alias_len)) {
if (error) {
spprintf(error, 0, unable to set alias in 
tar-based phar \%s\, phar-fname);
@@ -1014,6 +1020,10 @@ int phar_tar_flush(phar_archive_data *phar, char 
*user_stub, long len, int defau
 
len = pos - user_stub + 18;
entry.fp = php_stream_fopen_tmpfile();
+   if (entry.fp == NULL) {
+   spprintf(error, 0, phar error: unable to create 
temporary file);
+   return EOF;
+   }
entry.uncompressed_filesize = len + 5;
 
if ((size_t)len != php_stream_write(entry.fp, user_stub, len)
@@ -1038,7 +1048,10 @@ int phar_tar_flush(phar_archive_data *phar, char 
*user_stub, long len, int defau
} else {
/* Either this is a brand new phar (add the stub), or the 
default stub is required (overwrite the stub) */
entry.fp = php_stream_fopen_tmpfile();
-
+   if (entry.fp == NULL) {
+   spprintf(error, 0, phar error: unable to create 
temporary file);
+   return EOF;
+   }
if (sizeof(newstub)-1 != php_stream_write(entry.fp, newstub, 
sizeof(newstub)-1)) {
php_stream_close(entry.fp);
if (error

[PHP-CVS] svn: /SVNROOT/ global_avail

2013-05-01 Thread Pierre Joye
pajoye   Wed, 01 May 2013 20:14:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=330169

Log:
jas karma for ext/openssl

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2013-05-01 03:02:06 UTC (rev 330168)
+++ SVNROOT/global_avail2013-05-01 20:14:18 UTC (rev 330169)
@@ -185,7 +185,7 @@
 avail|fmk|php-src.git/ext/mssql
 avail|asautins,dbenson,maxim,ray,abonamous,ldixon|php-src.git/ext/oci8
 avail|kara,fmk,sschadt,nicos|php-src.git/ext/odbc
-avail|venaas|php-src.git/ext/openssl
+avail|venaas,jas|php-src.git/ext/openssl
 avail|kara|php-src.git/ext/oracle,pecl/oracle
 avail|nmav|php-src.git/ext/ovrimos,pecl/ovrimos
 avail|steinm|php-src.git/ext/pdf

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-04-30 Thread Pierre Joye
Commit:fc666bdb83ad2ba640b2dafad76930a87bff6b7c
Author:Pierre Joye pierre@gmail.com Tue, 30 Apr 2013 08:03:46 
+0200
Parents:   05a88447adcdae59c70723a9da209a711652432e 
83682d8833f6885d17f8bfcab3c261113d85cbbb
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fc666bdb83ad2ba640b2dafad76930a87bff6b7c

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix #64738, fix implicit type declaration

Bugs:
https://bugs.php.net/64738

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix #64738, fix implicit type declaration: ext/gd/libgd/gd_interpolation.c

2013-04-30 Thread Pierre Joye
Commit:1a335d20a89d0e797c10092810c6134720560b01
Author:Pierre Joye pierre@gmail.com Tue, 30 Apr 2013 07:52:40 
+0200
Parents:   983438a46385710fc3e1314fb7a956da09b6
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1a335d20a89d0e797c10092810c6134720560b01

Log:
 fix #64738, fix implicit type declaration

Bugs:
https://bugs.php.net/64738

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index ccdefb9..6c5549e 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -978,7 +978,7 @@ static inline void _gdScaleRow(gdImagePtr pSrc,  unsigned 
int src_width, gdImage
 
/* Accumulate each channel */
 for (i = left; i = right; i++) {
-   const left_channel = i - left;
+   const int left_channel = i - left;
 r += (unsigned char)(contrib-ContribRow[x].Weights[left_channel] 
* (double)(gdTrueColorGetRed(p_src_row[i])));
 g += (unsigned char)(contrib-ContribRow[x].Weights[left_channel] 
* (double)(gdTrueColorGetGreen(p_src_row[i])));
 b += (unsigned char)(contrib-ContribRow[x].Weights[left_channel] 
* (double)(gdTrueColorGetBlue(p_src_row[i])));


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix #64725, wrong res check: ext/gd/gd.c

2013-04-27 Thread Pierre Joye
Commit:25c9f34c9c48cfca70d3e9a154255ef75efd3454
Author:Pierre Joye pierre@gmail.com Sat, 27 Apr 2013 17:52:30 
+0200
Parents:   2809afa1196bd73c3a5e5c119bd1d7db3cf45844
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=25c9f34c9c48cfca70d3e9a154255ef75efd3454

Log:
fix #64725, wrong res check

Bugs:
https://bugs.php.net/64725

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 60056d1..4e118d1 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5576,7 +5576,7 @@ PHP_FUNCTION(imageaffinematrixget)
RETURN_FALSE;
}
 
-   if (res = GD_FALSE) {
+   if (res == GD_FALSE) {
RETURN_FALSE;
} else {
array_init(return_value);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-04-27 Thread Pierre Joye
Commit:eaec5522ff2dec3e0ecfc73d0f64ea2cbb40b728
Author:Pierre Joye pierre@gmail.com Sat, 27 Apr 2013 17:52:38 
+0200
Parents:   bba7f8aa319a87c448fa6980031218917fa8c427 
25c9f34c9c48cfca70d3e9a154255ef75efd3454
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=eaec5522ff2dec3e0ecfc73d0f64ea2cbb40b728

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix #64725, wrong res check

Bugs:
https://bugs.php.net/64725

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - #64710, check return val: ext/gd/gd.c

2013-04-26 Thread Pierre Joye
Commit:2809afa1196bd73c3a5e5c119bd1d7db3cf45844
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:15:33 
+0200
Parents:   7bd20354a828b1975571bddf7e1f7a43e264992d
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2809afa1196bd73c3a5e5c119bd1d7db3cf45844

Log:
- #64710, check return val

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index c3f6188..60056d1 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5516,7 +5516,7 @@ PHP_FUNCTION(imageaffinematrixget)
gdAffineStandardMatrix type;
zval *options;
zval **tmp;
-   int res, i;
+   int res = GD_FALSE, i;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|z, type, 
options) == FAILURE)  {
return;
@@ -5576,9 +5576,13 @@ PHP_FUNCTION(imageaffinematrixget)
RETURN_FALSE;
}
 
-   array_init(return_value);
-   for (i = 0; i  6; i++) {
-   add_index_double(return_value, i, affine[i]);
+   if (res = GD_FALSE) {
+   RETURN_FALSE;
+   } else {
+   array_init(return_value);
+   for (i = 0; i  6; i++) {
+   add_index_double(return_value, i, affine[i]);
+   }
}
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - #64710, kill unused var: ext/gd/libgd/gd.c

2013-04-26 Thread Pierre Joye
Commit:7bd20354a828b1975571bddf7e1f7a43e264992d
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:15:05 
+0200
Parents:   b0afef2d5e0bacb875fe18b640dac648bae30f41
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7bd20354a828b1975571bddf7e1f7a43e264992d

Log:
- #64710, kill unused var

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/libgd/gd.c


Diff:
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 794d276..81eba52 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -3011,7 +3011,7 @@ void gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, 
int *x2P, int *y2P)
 int gdImagePaletteToTrueColor(gdImagePtr src)
 {
unsigned int y;
-   unsigned char alloc_y = 0, alloc_aa = 0;
+   unsigned char alloc_y = 0;
unsigned int yy;
 
if (src == NULL) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: #64710, kill unused vars: ext/gd/gd.c

2013-04-26 Thread Pierre Joye
Commit:b0afef2d5e0bacb875fe18b640dac648bae30f41
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:10:24 
+0200
Parents:   685a6d9aab5fe9f8f66193b407e29126876b84c6
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b0afef2d5e0bacb875fe18b640dac648bae30f41

Log:
#64710, kill unused vars

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index fc22dba..c3f6188 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5411,9 +5411,6 @@ finish:
 PHP_FUNCTION(imageaffine)
 {
zval *IM;
-   long mode = -1;
-   long color = -1;
-   double threshold = 0.5f;
gdImagePtr src;
gdImagePtr dst;
gdRect rect;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: #64710, kill unused vars: ext/gd/gd.c

2013-04-26 Thread Pierre Joye
Commit:7b06189702e270f5bf98ee7d8537b28a83758ad6
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:08:38 
+0200
Parents:   3fffc78ed0e49101de97e2c9676cea1c8035ed5a
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7b06189702e270f5bf98ee7d8537b28a83758ad6

Log:
#64710, kill unused vars

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index dc1978e..fc22dba 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5363,9 +5363,6 @@ PHP_FUNCTION(imagecropauto)
 PHP_FUNCTION(imagescale)
 {
zval *IM;
-   long mode = -1;
-   long color = -1;
-   double threshold = 0.5f;
gdImagePtr im;
gdImagePtr im_scaled;
int new_width, new_height = -1;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: #64710, kill unused vars: ext/gd/libgd/gd.c

2013-04-26 Thread Pierre Joye
Commit:685a6d9aab5fe9f8f66193b407e29126876b84c6
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:09:19 
+0200
Parents:   7b06189702e270f5bf98ee7d8537b28a83758ad6
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=685a6d9aab5fe9f8f66193b407e29126876b84c6

Log:
#64710, kill unused vars

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/libgd/gd.c


Diff:
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 093e35a..794d276 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -2352,8 +2352,6 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, 
int dstX, int dstY, int
int colorMap[gdMaxColors];
/* Stretch vectors */
int *stx, *sty;
-   /* We only need to use floating point to determine the correct stretch 
vector for one line's worth. */
-   double accum;

if (overflow2(sizeof(int), srcW)) {
return;
@@ -2364,7 +2362,6 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, 
int dstX, int dstY, int
 
stx = (int *) gdMalloc (sizeof (int) * srcW);
sty = (int *) gdMalloc (sizeof (int) * srcH);
-   accum = 0;
 
/* Fixed by Mao Morimoto 2.0.16 */
for (i = 0; (i  srcW); i++) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: #64710, kill unused vars: ext/gd/gd.c

2013-04-26 Thread Pierre Joye
Commit:3fffc78ed0e49101de97e2c9676cea1c8035ed5a
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:07:47 
+0200
Parents:   b5902b6c9de4886a1e66e93c6aaabc9eb4ee768c
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3fffc78ed0e49101de97e2c9676cea1c8035ed5a

Log:
#64710, kill unused vars

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index ab9d850..dc1978e 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5260,9 +5260,6 @@ PHP_FUNCTION(imageantialias)
 PHP_FUNCTION(imagecrop)
 {
zval *IM;
-   long mode = -1;
-   long color = -1;
-   double threshold = 0.5f;
gdImagePtr im;
gdImagePtr im_crop;
gdRect rect;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: #64710, Implicit declaration: ext/gd/gd.c

2013-04-26 Thread Pierre Joye
Commit:afe46d4d47d5ef7ad80f55a6776b3f4b88f452bf
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 07:48:11 
+0200
Parents:   4941e3fe449228945f6b6570f2da9eeccb89c8a5
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=afe46d4d47d5ef7ad80f55a6776b3f4b88f452bf

Log:
#64710, Implicit declaration

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 7da9e25..ab9d850 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -56,6 +56,8 @@
 #if HAVE_LIBGD
 #if !HAVE_GD_BUNDLED
 # include libgd/gd_compat.h
+#else
+extern int overflow2(int a, int b);
 #endif
 
 static int le_gd, le_gd_font;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: #64710, kill unused vars: ext/gd/libgd/gd.c

2013-04-26 Thread Pierre Joye
Commit:b5902b6c9de4886a1e66e93c6aaabc9eb4ee768c
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:06:34 
+0200
Parents:   afe46d4d47d5ef7ad80f55a6776b3f4b88f452bf
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b5902b6c9de4886a1e66e93c6aaabc9eb4ee768c

Log:
#64710, kill unused vars

Bugs:
https://bugs.php.net/64710

Changed paths:
  M  ext/gd/libgd/gd.c


Diff:
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index cb45c0e..093e35a 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1958,7 +1958,6 @@ static void _gdImageFillTiled(gdImagePtr im, int x, int 
y, int nc)
 {
int i, l, x1, x2, dy;
int oc;   /* old pixel value */
-   int tiled;
int wx2,wy2;
/* stack of filled segments */
struct seg *stack;
@@ -1970,7 +1969,6 @@ static void _gdImageFillTiled(gdImagePtr im, int x, int 
y, int nc)
}
 
wx2=im-sx;wy2=im-sy;
-   tiled = nc==gdTiled;
 
nc =  gdImageTileGet(im,x,y);
 
@@ -2035,7 +2033,6 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int 
x2, int y2, int color)
 {
int x1h = x1, x1v = x1, y1h = y1, y1v = y1, x2h = x2, x2v = x2, y2h = 
y2, y2v = y2;
int thick = im-thick;
-   int half1 = 1;
int t;
 
if (x1 == x2  y1 == y2  thick == 1) {
@@ -2057,7 +2054,7 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int 
x2, int y2, int color)
if (thick  1) {
int cx, cy, x1ul, y1ul, x2lr, y2lr;
int half = thick  1;
-   half1 = thick - half;
+
x1ul = x1 - half;
y1ul = y1 - half;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-04-26 Thread Pierre Joye
Commit:bba7f8aa319a87c448fa6980031218917fa8c427
Author:Pierre Joye pierre@gmail.com Fri, 26 Apr 2013 08:16:02 
+0200
Parents:   fde3198daa7676477492614c6c8e19ef09f0c07b 
2809afa1196bd73c3a5e5c119bd1d7db3cf45844
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bba7f8aa319a87c448fa6980031218917fa8c427

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - #64710, check return val
  - #64710, kill unused var
  #64710, kill unused vars
  #64710, kill unused vars
  #64710, kill unused vars
  #64710, kill unused vars
  #64710, kill unused vars
  #64710, Implicit declaration

Bugs:
https://bugs.php.net/64710

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix x64 opcache, still uses fugly fixed addresses, see TODO entry for explanaton: ext/opcache/shared_alloc_win32.c

2013-04-20 Thread Pierre Joye
Commit:14d9f3450b8e9cb41240e2403fdb812782ee7ee6
Author:Pierre Joye pierre@gmail.com Sat, 20 Apr 2013 18:22:39 
+0200
Parents:   0704e4badb3abdfbdd5efc2b6d51c8abd6e5629a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=14d9f3450b8e9cb41240e2403fdb812782ee7ee6

Log:
fix x64 opcache, still uses fugly fixed addresses, see TODO entry for explanaton

Changed paths:
  M  ext/opcache/shared_alloc_win32.c


Diff:
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 2c32184..fb84857 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -177,7 +177,16 @@ static int create_segments(size_t requested_size, 
zend_shared_segment ***shared_
zend_shared_segment *shared_segment;
int map_retries = 0;
void *default_mapping_base_set[] = { 0, 0 };
-   void *vista_mapping_base_set[] = { (void *)0x2000, (void 
*)0x2100, (void *)0x3000, (void *)0x3100, (void *)0x5000, 0 };
+   /* TODO: 
+ improve fixed addresses on x64. It still makes no sense to do it as 
Windows addresses are virtual per se and can or should be randomized anyway 
+ through Address Space Layout Radomization (ASLR). We can still let 
the OS do its job and be sure that each process gets the same address if
+ desired. Not done yet, @zend refused but did not remember the exact 
reason, pls add info here if one of you know why :)
+   */
+#if defined(_WIN64)
+   void *vista_mapping_base_set[] = { (void *) 0x1000, (void 
*) 0x2000, (void *) 0x3000, (void *) 
0x7000, 0 };
+#else
+   void *vista_mapping_base_set[] = { (void *) 0x2000, (void *) 
0x2100, (void *) 0x3000, (void *) 0x3100, (void *) 0x5000, 0 };
+#endif
void **wanted_mapping_base = default_mapping_base_set;
TSRMLS_FETCH();
 
@@ -258,11 +267,6 @@ static int create_segments(size_t requested_size, 
zend_shared_segment ***shared_
 
/* Are we running Vista ? */
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT  
osvi.dwMajorVersion == 6) {
-   /* Assert that platform is 32 bit (for 64 bit 
we need to test a different set */
-   if (si.wProcessorArchitecture != 
PROCESSOR_ARCHITECTURE_INTEL) {
-   DebugBreak();
-   }
-
wanted_mapping_base = vista_mapping_base_set;
}
} while (0);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /SVNROOT/ global_avail

2013-04-18 Thread Pierre Joye
pajoye   Thu, 18 Apr 2013 19:34:40 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=330117

Log:
give Ondrej access to ext/gd, surely php-src later

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2013-04-18 14:23:33 UTC (rev 330116)
+++ SVNROOT/global_avail2013-04-18 19:34:40 UTC (rev 330117)
@@ -166,7 +166,7 @@
 avail|steinm|php-src.git/ext/fdf
 avail|alan_k|php-src.git/ext/dio
 avail|askalski|php-src.git/ext/ftp
-avail|jah,ttoohey,smantoor|php-src.git/ext/gd
+avail|jah,ttoohey,smantoor,ondrej|php-src.git/ext/gd
 avail|alex|php-src.git/ext/gettext
 avail|steinm|php-src.git/ext/hyperwave
 avail|musone|php-src.git/ext/icap

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/gd/config.m4 ext/gd/gd.c

2013-04-10 Thread Pierre Joye
Commit:c480bf3fb2f04952f4421df197c58b07b479c1c1
Author:Pierre Joye pierre@gmail.com Wed, 10 Apr 2013 20:13:18 
+0200
Parents:   442ff25187081212631c03a49041a0529520b505 
224a67fb9f91f027efa8142d6b81072b33bd6cc5
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c480bf3fb2f04952f4421df197c58b07b479c1c1

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  add external 2.1 detection and fix gd_compat for 2.1+

Changed paths:
  MM  ext/gd/config.m4
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: add external 2.1 detection and fix gd_compat for 2.1+: ext/gd/config.m4 ext/gd/gd.c ext/gd/libgd/gd_compat.h

2013-04-10 Thread Pierre Joye
Commit:224a67fb9f91f027efa8142d6b81072b33bd6cc5
Author:Pierre Joye pierre@gmail.com Wed, 10 Apr 2013 20:12:25 
+0200
Parents:   ecdf8bcc455a660086f85b47f68ecc802c20ac2b
Branches:  PHP-5.3 PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=224a67fb9f91f027efa8142d6b81072b33bd6cc5

Log:
add external 2.1 detection and fix gd_compat for 2.1+

Changed paths:
  M  ext/gd/config.m4
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd_compat.h


Diff:
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index ebbdb92..d85c8b9 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -252,6 +252,8 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
   PHP_CHECK_LIBRARY(gd, gdFreeFontCache,
[AC_DEFINE(HAVE_GD_FREEFONTCACHE,1, [ ])], [], [ -L$GD_LIB 
$GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdFontCacheMutexSetup,  [AC_DEFINE(HAVE_GD_FONTMUTEX,  
  1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx,  
[AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX,   1, [ ])], [], [ -L$GD_LIB 
$GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdImageConvolution, 
[AC_DEFINE(HAVE_GD_IMAGE_CONVOLUTION,  1, [ ])], [], [ -L$GD_LIB 
$GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdImagePixelate,
[AC_DEFINE(HAVE_GD_IMAGE_PIXELATE, 1, [ ])], [], [ -L$GD_LIB 
$GD_SHARED_LIBADD ])
 ])
 
 dnl
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 3bb9fa2..25f5368 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1241,9 +1241,13 @@ PHP_RSHUTDOWN_FUNCTION(gd)
 /* }}} */
 
 #if HAVE_GD_BUNDLED
-#define PHP_GD_VERSION_STRING bundled (2.0.34 compatible)
+#define PHP_GD_VERSION_STRING bundled (2.1.0 compatible)
 #else
-#define PHP_GD_VERSION_STRING 2.0
+# ifdef GD_VERSION_STRING
+#  define PHP_GD_VERSION_STRING GD_VERSION_STRING
+# else
+#  define PHP_GD_VERSION_STRING 2.0
+# endif
 #endif
 
 /* {{{ PHP_MINFO_FUNCTION
diff --git a/ext/gd/libgd/gd_compat.h b/ext/gd/libgd/gd_compat.h
index c084a00..779e709 100644
--- a/ext/gd/libgd/gd_compat.h
+++ b/ext/gd/libgd/gd_compat.h
@@ -32,6 +32,7 @@ int gdImageContrast(gdImagePtr src, double contrast);
 /* Simply adds or substracts respectively red, green or blue to a pixel */
 int gdImageColor(gdImagePtr src, const int red, const int green, const int 
blue, const int alpha);
 
+#if !defined(HAVE_GD_IMAGE_CONVOLUTION)
 /* Image convolution by a 3x3 custom matrix */
 int gdImageConvolution(gdImagePtr src, float ft[3][3], float filter_div, float 
offset);
 int gdImageEdgeDetectQuick(gdImagePtr src);
@@ -40,12 +41,18 @@ int gdImageSelectiveBlur( gdImagePtr src);
 int gdImageEmboss(gdImagePtr im);
 int gdImageMeanRemoval(gdImagePtr im);
 int gdImageSmooth(gdImagePtr im, float weight);
+#endif
+
+#if !defined(HAVE_GD_IMAGE_PIXELATE)
 enum gdPixelateMode {
GD_PIXELATE_UPPERLEFT,
GD_PIXELATE_AVERAGE
 };
 
 int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode);
+#endif
+
+int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode);
 
 #if !HAVE_GD_IMAGEELLIPSE
 void gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int c);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/gd/config.m4 ext/gd/gd.c

2013-04-10 Thread Pierre Joye
Commit:87f5d9aa1bb9bdbfaecce5ad4739788a7719358f
Author:Pierre Joye pierre@gmail.com Wed, 10 Apr 2013 20:13:46 
+0200
Parents:   2b3a4afcbfc2786a075ef8a7410a495f102314ec 
c480bf3fb2f04952f4421df197c58b07b479c1c1
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=87f5d9aa1bb9bdbfaecce5ad4739788a7719358f

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  add external 2.1 detection and fix gd_compat for 2.1+

Changed paths:
  MM  ext/gd/config.m4
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-04-10 Thread Pierre Joye
Commit:ca1962949eb18f60624e3cae5343a5b3dff98383
Author:Pierre Joye pierre@gmail.com Wed, 10 Apr 2013 20:14:00 
+0200
Parents:   5868b93c49d1d70ba115691f77e0fcbb8075d4f7 
87f5d9aa1bb9bdbfaecce5ad4739788a7719358f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ca1962949eb18f60624e3cae5343a5b3dff98383

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  add external 2.1 detection and fix gd_compat for 2.1+

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: lucky that the name is not used, fix name of encoder: ext/gd/gd.c

2013-04-10 Thread Pierre Joye
Commit:684f4d5272fc4a3bb1aecb14674f610227a9ca5e
Author:Pierre Joye pierre@gmail.com Thu, 11 Apr 2013 06:42:38 
+0200
Parents:   c480bf3fb2f04952f4421df197c58b07b479c1c1
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=684f4d5272fc4a3bb1aecb14674f610227a9ca5e

Log:
lucky that the name is not used, fix name of encoder

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 0984c87..87e8893 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2830,7 +2830,7 @@ static void 
_php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
 #if HAVE_GD_BUNDLED
 PHP_FUNCTION(imagexbm)
 {
-   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_XBM, GIF, gdImageXbmCtx);
+   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_XBM, XBM, gdImageXbmCtx);
 }
 #endif
 /* }}} */
@@ -2850,7 +2850,7 @@ PHP_FUNCTION(imagegif)
Output PNG image to browser or file */
 PHP_FUNCTION(imagepng)
 {
-   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_PNG, GIF, gdImagePngCtxEx);
+   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_PNG, PNG, gdImagePngCtxEx);
 }
 /* }}} */
 #endif /* HAVE_GD_PNG */
@@ -2861,7 +2861,7 @@ PHP_FUNCTION(imagepng)
Output PNG image to browser or file */
 PHP_FUNCTION(imagewebp)
 {
-   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_WEBP, GIF, gdImageWebpCtx);
+   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_WEBP, WEBP, gdImageWebpCtx);
 }
 /* }}} */
 #endif /* HAVE_GD_WEBP */
@@ -2872,7 +2872,7 @@ PHP_FUNCTION(imagewebp)
Output JPEG image to browser or file */
 PHP_FUNCTION(imagejpeg)
 {
-   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_JPG, GIF, gdImageJpegCtx);
+   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_JPG, JPEG, gdImageJpegCtx);
 }
 /* }}} */
 #endif /* HAVE_GD_JPG */
@@ -2882,7 +2882,7 @@ PHP_FUNCTION(imagejpeg)
Output WBMP image to browser or file */
 PHP_FUNCTION(imagewbmp)
 {
-   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_WBM, GIF, gdImageWBMPCtx);
+   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_GDIMG_TYPE_WBM, WBMP, gdImageWBMPCtx);
 }
 /* }}} */
 #endif /* HAVE_GD_WBMP */


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-04-10 Thread Pierre Joye
Commit:e2f3c7f2bc3853bb485b5a84abcef1958a96ccee
Author:Pierre Joye pierre@gmail.com Thu, 11 Apr 2013 07:08:58 
+0200
Parents:   ab165d3465b689040f7306f41294db5d73a66076 
e71b7945698c4df46c30d14108e61af2953ae233
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e2f3c7f2bc3853bb485b5a84abcef1958a96ccee

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  lucky that the name is not used, fix name of encoder

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/gd/gd.c

2013-04-10 Thread Pierre Joye
Commit:e71b7945698c4df46c30d14108e61af2953ae233
Author:Pierre Joye pierre@gmail.com Thu, 11 Apr 2013 07:08:39 
+0200
Parents:   6df1e8d3fe014ea9a3e42a371a16c6f9cd397bbb 
4475dbf11d6660818537ae706583b7c15139c13f
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e71b7945698c4df46c30d14108e61af2953ae233

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  lucky that the name is not used, fix name of encoder

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix null deref: ext/gd/libgd/gd_rotate.c

2013-04-09 Thread Pierre Joye
Commit:4d4adf47e0a31f56e7c2ecf777895de3d70b05ea
Author:Pierre Joye pierre@gmail.com Tue, 9 Apr 2013 10:04:01 
+0200
Parents:   1b60c189ad4e45d57df576ab180c5cb91c2db8a7
Branches:  PHP-5.3 PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4d4adf47e0a31f56e7c2ecf777895de3d70b05ea

Log:
fix null deref

Changed paths:
  M  ext/gd/libgd/gd_rotate.c


Diff:
diff --git a/ext/gd/libgd/gd_rotate.c b/ext/gd/libgd/gd_rotate.c
index 430d51d..e9a393d 100644
--- a/ext/gd/libgd/gd_rotate.c
+++ b/ext/gd/libgd/gd_rotate.c
@@ -262,12 +262,13 @@ gdImagePtr gdImageRotate180 (gdImagePtr src, int 
ignoretransparent)
f = gdImageGetPixel;
}
dst = gdImageCreateTrueColor(src-sx, src-sy);
-   dst-transparent = src-transparent;
 
if (dst != NULL) {
int old_blendmode = dst-alphaBlendingFlag;
dst-alphaBlendingFlag = 0;
 
+   dst-transparent = src-transparent;
+
gdImagePaletteCopy (dst, src);
 
for (uY = 0; uYsrc-sy; uY++) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix possible NULL deref: ext/gd/libgd/gd_rotate.c

2013-04-09 Thread Pierre Joye
Commit:88b3cdc4e9ec199044dd9b2d82d12639226091dd
Author:Pierre Joye pierre@gmail.com Tue, 9 Apr 2013 10:09:17 
+0200
Parents:   4d4adf47e0a31f56e7c2ecf777895de3d70b05ea
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=88b3cdc4e9ec199044dd9b2d82d12639226091dd

Log:
fix possible NULL deref

Changed paths:
  M  ext/gd/libgd/gd_rotate.c


Diff:
diff --git a/ext/gd/libgd/gd_rotate.c b/ext/gd/libgd/gd_rotate.c
index e9a393d..e94809a 100644
--- a/ext/gd/libgd/gd_rotate.c
+++ b/ext/gd/libgd/gd_rotate.c
@@ -216,12 +216,13 @@ gdImagePtr gdImageRotate90 (gdImagePtr src, int 
ignoretransparent)
f = gdImageGetPixel;
}
dst = gdImageCreateTrueColor(src-sy, src-sx);
-   dst-transparent = src-transparent;
 
if (dst != NULL) {
int old_blendmode = dst-alphaBlendingFlag;
dst-alphaBlendingFlag = 0;
 
+   dst-transparent = src-transparent;
+
gdImagePaletteCopy (dst, src);
 
for (uY = 0; uYsrc-sy; uY++) {
@@ -310,12 +311,13 @@ gdImagePtr gdImageRotate270 (gdImagePtr src, int 
ignoretransparent)
f = gdImageGetPixel;
}
dst = gdImageCreateTrueColor (src-sy, src-sx);
-   dst-transparent = src-transparent;
 
if (dst != NULL) {
int old_blendmode = dst-alphaBlendingFlag;
dst-alphaBlendingFlag = 0;
 
+   dst-transparent = src-transparent;
+
gdImagePaletteCopy (dst, src);
 
for (uY = 0; uYsrc-sy; uY++) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-04-08 Thread Pierre Joye
Commit:21cfbdf42c97f2f875f0bc7cc54ea9813b933d89
Author:Pierre Joye pierre@gmail.com Tue, 9 Apr 2013 06:45:24 
+0200
Parents:   95f830bc816f618d01641a5f2c9ea3c924b6d1bd 
85ad65ef4065735a8290602a3f10da21a07c5983
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=21cfbdf42c97f2f875f0bc7cc54ea9813b933d89

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix some unitialized values and typo

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix some unitialized values and typo: ext/gd/libgd/gd_interpolation.c

2013-04-08 Thread Pierre Joye
Commit:85ad65ef4065735a8290602a3f10da21a07c5983
Author:Pierre Joye pierre@gmail.com Tue, 9 Apr 2013 06:44:45 
+0200
Parents:   ac0b66f160cd59801cc2336c485f3db4225955ce
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=85ad65ef4065735a8290602a3f10da21a07c5983

Log:
fix some unitialized values and typo

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index d805ec9..a1916a1 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -639,7 +639,7 @@ static inline int getPixelOverflowTC(gdImagePtr im, const 
int x, const int y, co
}
return c;
} else {
-   register int border;
+   register int border = 0;
 
if (y  im-cy1) {
border = im-tpixels[0][im-cx1];
@@ -690,7 +690,7 @@ static inline int getPixelOverflowPalette(gdImagePtr im, 
const int x, const int
}
return colorIndex2RGBA(c);
} else {
-   register int border;
+   register int border = 0;
if (y  im-cy1) {
border = gdImageGetPixel(im, im-cx1, 0);
goto processborder;
@@ -886,7 +886,7 @@ static inline LineContribType * 
_gdContributionsAlloc(unsigned int line_length,
 return res;
 }
 
-static inline _gdContributionsFree(LineContribType * p)
+static inline void _gdContributionsFree(LineContribType * p)
 {
unsigned int u;
for (u = 0; u  p-LineLength; u++)  {
@@ -1001,7 +1001,7 @@ static inline void _gdScaleHoriz(gdImagePtr pSrc, 
unsigned int src_width, unsign
_gdContributionsFree (contrib);
 }
 
-static inline _gdScaleCol (gdImagePtr pSrc,  unsigned int src_width, 
gdImagePtr pRes, unsigned int dst_width, unsigned int dst_height, unsigned int 
uCol, LineContribType *contrib)
+static inline void _gdScaleCol (gdImagePtr pSrc,  unsigned int src_width, 
gdImagePtr pRes, unsigned int dst_width, unsigned int dst_height, unsigned int 
uCol, LineContribType *contrib)
 {
unsigned int y;
 for (y = 0; y  dst_height - 1; y++) {
@@ -1024,7 +1024,7 @@ static inline _gdScaleCol (gdImagePtr pSrc,  unsigned int 
src_width, gdImagePtr
 }
 }
 
-static inline _gdScaleVert (const gdImagePtr pSrc, const unsigned int 
src_width, const unsigned int src_height, const gdImagePtr pDst, const unsigned 
int dst_width, const unsigned int dst_height)
+static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int 
src_width, const unsigned int src_height, const gdImagePtr pDst, const unsigned 
int dst_width, const unsigned int dst_height)
 {
unsigned int u;
LineContribType * contrib;
@@ -1058,6 +1058,7 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, 
const unsigned int src_widt
 
dst = gdImageCreateTrueColor(new_width, new_height);
if (dst == NULL) {
+   gdFree(tmp_im);
return NULL;
}
_gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height);
@@ -1149,7 +1150,7 @@ static inline int getPixelOverflowColorTC(gdImagePtr im, 
const int x, const int
}
return c;
} else {
-   register int border;
+   register int border = 0;
if (y  im-cy1) {
border = im-tpixels[0][im-cx1];
goto processborder;
@@ -2328,12 +2329,12 @@ int gdTransformAffineCopy(gdImagePtr dst,
gdPointF pt, src_pt;
gdRect bbox;
int end_x, end_y;
-   gdInterpolationMethod interpolotion_id_bak;
+   gdInterpolationMethod interpolation_id_bak = GD_DEFAULT;
interpolation_method interpolation_bak;
 
/* These methods use special implementations */
if (src-interpolation_id == GD_BILINEAR_FIXED || src-interpolation_id 
== GD_BICUBIC_FIXED || src-interpolation_id == GD_NEAREST_NEIGHBOUR) {
-   interpolotion_id_bak = src-interpolation_id;
+   interpolation_id_bak = src-interpolation_id;
interpolation_bak = src-interpolation;

gdImageSetInterpolationMethod(src, GD_BICUBIC);
@@ -2360,7 +2361,7 @@ int gdTransformAffineCopy(gdImagePtr dst,
gdImageSetClip(src, backup_clipx1, backup_clipy1,
backup_clipx2, backup_clipy2);
}
-   gdImageSetInterpolationMethod(src, interpolotion_id_bak);
+   gdImageSetInterpolationMethod(src, interpolation_id_bak);
return GD_FALSE;
}
 
@@ -2410,7 +2411,7 @@ int gdTransformAffineCopy(gdImagePtr dst,
backup_clipx2, backup_clipy2);
}
 
-   gdImageSetInterpolationMethod(src, interpolotion_id_bak);
+   gdImageSetInterpolationMethod(src

[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-04-08 Thread Pierre Joye
Commit:396b1109cff60de187f7d5dbb89d35a4189b088e
Author:Pierre Joye pierre@gmail.com Tue, 9 Apr 2013 07:05:03 
+0200
Parents:   28a9181ceb4058c6b6123fdf8a42adf8828b51ed 
83500123d02789781c25691527ae720ba1587948
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=396b1109cff60de187f7d5dbb89d35a4189b088e

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  ws and comment for recommended aa method

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: ws and comment for recommended aa method: ext/gd/libgd/gd_interpolation.c

2013-04-08 Thread Pierre Joye
Commit:83500123d02789781c25691527ae720ba1587948
Author:Pierre Joye pierre@gmail.com Tue, 9 Apr 2013 07:04:52 
+0200
Parents:   ec136c219ef38113c3e6dc46850ae2ba8971ea5c
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=83500123d02789781c25691527ae720ba1587948

Log:
ws and comment for recommended aa method

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index a1916a1..ccdefb9 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -35,6 +35,17 @@
 */
 
 /*
+   Additional functions are available for simple rotation or 
up/downscaling.
+   downscaling using the fixed point implementations are usually much 
faster
+   than the existing gdImageCopyResampled while having a similar or better
+   quality.
+   
+   For image rotations, the optimized versions have a lazy antialiasing 
for 
+   the edges of the images. For a much better antialiased result, the 
affine
+   function is recommended.
+*/
+
+/*
 TODO:
  - Optimize pixel accesses and loops once we have continuous buffer
  - Add scale support for a portion only of an image (equivalent of 
copyresized/resampled)
@@ -1004,24 +1015,24 @@ static inline void _gdScaleHoriz(gdImagePtr pSrc, 
unsigned int src_width, unsign
 static inline void _gdScaleCol (gdImagePtr pSrc,  unsigned int src_width, 
gdImagePtr pRes, unsigned int dst_width, unsigned int dst_height, unsigned int 
uCol, LineContribType *contrib)
 {
unsigned int y;
-for (y = 0; y  dst_height - 1; y++) {
-register unsigned char r = 0, g = 0, b = 0, a = 0;
-const int iLeft = contrib-ContribRow[y].Left;
-const int iRight = contrib-ContribRow[y].Right;
+   for (y = 0; y  dst_height - 1; y++) {
+   register unsigned char r = 0, g = 0, b = 0, a = 0;
+   const int iLeft = contrib-ContribRow[y].Left;
+   const int iRight = contrib-ContribRow[y].Right;
int i;
int *row = pRes-tpixels[y];
 
/* Accumulate each channel */
-for (i = iLeft; i = iRight; i++) {
-const int pCurSrc = pSrc-tpixels[i][uCol];
+   for (i = iLeft; i = iRight; i++) {
+   const int pCurSrc = pSrc-tpixels[i][uCol];
const int i_iLeft = i - iLeft;
-r += (unsigned char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetRed(pCurSrc)));
-g += (unsigned char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetGreen(pCurSrc)));
-b += (unsigned char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetBlue(pCurSrc)));
+   r += (unsigned 
char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetRed(pCurSrc)));
+   g += (unsigned 
char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetGreen(pCurSrc)));
+   b += (unsigned 
char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetBlue(pCurSrc)));
a += (unsigned 
char)(contrib-ContribRow[y].Weights[i_iLeft] * 
(double)(gdTrueColorGetAlpha(pCurSrc)));
-}
+   }
pRes-tpixels[y][uCol] = gdTrueColorAlpha(r, g, b, a);
-}
+   }
 }
 
 static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int 
src_width, const unsigned int src_height, const gdImagePtr pDst, const unsigned 
int dst_width, const unsigned int dst_height)
@@ -1030,12 +1041,12 @@ static inline void _gdScaleVert (const gdImagePtr pSrc, 
const unsigned int src_w
LineContribType * contrib;
 
/* same height, copy it */
-if (src_height == dst_height) {
+   if (src_height == dst_height) {
unsigned int y;
for (y = 0; y  src_height - 1; ++y) {
memcpy(pDst-tpixels[y], pSrc-tpixels[y], src_width);
}
-}
+   }
 
contrib = _gdContributionsCalc(dst_height, src_height, 
(double)(dst_height) / (double)(src_height), pSrc-interpolation);
/* scale each column */
@@ -1047,14 +1058,14 @@ static inline void _gdScaleVert (const gdImagePtr pSrc, 
const unsigned int src_w
 
 gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int 
src_width, const unsigned int src_height, const unsigned int new_width, const 
unsigned int new_height)
 {
-gdImagePtr tmp_im;
+   gdImagePtr tmp_im;
gdImagePtr dst;
 
tmp_im = gdImageCreateTrueColor(new_width, src_height);
if (tmp_im == NULL) {
return NULL;
}
-   _gdScaleHoriz (src,  src_width, src_height, tmp_im, new_width, 
src_height);
+   _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, 
src_height);
 
dst = gdImageCreateTrueColor(new_width, new_height

[PHP-CVS] com php-src: fix BELL constant declaration: ext/gd/gd.c

2013-03-28 Thread Pierre Joye
Commit:ac0b66f160cd59801cc2336c485f3db4225955ce
Author:Pierre Joye pierre@gmail.com Thu, 28 Mar 2013 22:14:34 
+0100
Parents:   e7d88a63fa19c4b3df544563416b2c4370ad194b
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ac0b66f160cd59801cc2336c485f3db4225955ce

Log:
fix BELL constant declaration

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index d929e7f..73e1f58 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1265,7 +1265,7 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_CROP_THRESHOLD, GD_CROP_THRESHOLD, 
CONST_CS | CONST_PERSISTENT);
 

-   REGISTER_LONG_CONSTANT(IMG_BELL, GD_BILINEAR_FIXED, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_BELL, GD_BELL, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_BESSEL, GD_BESSEL, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_BILINEAR_FIXED, GD_BILINEAR_FIXED, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_BICUBIC, GD_BICUBIC, CONST_CS | 
CONST_PERSISTENT);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-28 Thread Pierre Joye
Commit:95f830bc816f618d01641a5f2c9ea3c924b6d1bd
Author:Pierre Joye pierre@gmail.com Thu, 28 Mar 2013 22:14:50 
+0100
Parents:   f2a2b418ec2be07a3046ab7ca541a90cc4572162 
ac0b66f160cd59801cc2336c485f3db4225955ce
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=95f830bc816f618d01641a5f2c9ea3c924b6d1bd

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix BELL constant declaration

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: versions no longer supported, no need to check: main/win32_internal_function_disabled.h

2013-03-27 Thread Pierre Joye
Commit:d0aa831614aafc2ae4975a0dc1e92ab97651d818
Author:Pierre Joye pierre@gmail.com Wed, 27 Mar 2013 07:15:23 
+0100
Parents:   f3ebb40ad6041e9c29e165f9d7017fb50063129f
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d0aa831614aafc2ae4975a0dc1e92ab97651d818

Log:
versions no longer supported, no need to check

Changed paths:
  M  main/win32_internal_function_disabled.h


Diff:
diff --git a/main/win32_internal_function_disabled.h 
b/main/win32_internal_function_disabled.h
index 3a78f6c..80fd8d1 100644
--- a/main/win32_internal_function_disabled.h
+++ b/main/win32_internal_function_disabled.h
@@ -23,12 +23,14 @@
 /*
 Windows Server 2008 6.0
 Windows Vista   6.0
+
+Verssions below are not supported anymore, php won't even load:
 Windows Server 2003 R2  5.2
 Windows Server 2003 5.2
 Windows XP  5.1
 Windows 20005.0
 */
-static const char *function_name_5[] = {link, NULL};
-const int function_name_cnt_5 = 1;
+static const char *function_name_5[] = {NULL};
+const int function_name_cnt_5 = 0;
 static const char *function_name_6[] = {readlink, symlink, NULL};
 const int function_name_cnt_6 = 2;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: add windows 8 and windows server 2012: ext/standard/info.c

2013-03-27 Thread Pierre Joye
Commit:f01a7e54d3d3ab82e7739b1e43a21179297208f6
Author:Pierre Joye pierre@gmail.com Wed, 27 Mar 2013 07:29:47 
+0100
Parents:   d0aa831614aafc2ae4975a0dc1e92ab97651d818
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f01a7e54d3d3ab82e7739b1e43a21179297208f6

Log:
add windows 8 and windows server 2012

Changed paths:
  M  ext/standard/info.c


Diff:
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 20e6b0c..e8ba908 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -316,7 +316,7 @@ char* php_get_windows_name()
}
 
if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId  osvi.dwMajorVersion  4 
) {
-   if (osvi.dwMajorVersion == 6)   {
+   if (osvi.dwMajorVersion == 6) {
if( osvi.dwMinorVersion == 0 ) {
if( osvi.wProductType == VER_NT_WORKSTATION ) {
major = Windows Vista;
@@ -330,6 +330,12 @@ char* php_get_windows_name()
} else {
major = Windows Server 2008 R2;
}
+   } else if ( osvi.dwMinorVersion == 2 ) {
+   if( osvi.wProductType == VER_NT_WORKSTATION )  {
+   major = Windows 8;
+   } else {
+   major = Windows Server 2012;
+   }
} else {
major = Unknown Windows version;
}


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-27 Thread Pierre Joye
Commit:33e834aab88277b1e4597c42878a2eebb428f3ef
Author:Pierre Joye pierre@gmail.com Wed, 27 Mar 2013 17:39:05 
+0100
Parents:   b03810761eccd582f2c500c997424b646909d474 
e7d88a63fa19c4b3df544563416b2c4370ad194b
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=33e834aab88277b1e4597c42878a2eebb428f3ef

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  add WebP support in phpinfo

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: add WebP support in phpinfo: ext/gd/gd.c

2013-03-27 Thread Pierre Joye
Commit:e7d88a63fa19c4b3df544563416b2c4370ad194b
Author:Pierre Joye pierre@gmail.com Wed, 27 Mar 2013 17:38:57 
+0100
Parents:   f01a7e54d3d3ab82e7739b1e43a21179297208f6
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e7d88a63fa19c4b3df544563416b2c4370ad194b

Log:
add WebP support in phpinfo

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 3ce1a2c..d929e7f 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1439,6 +1439,9 @@ PHP_MINFO_FUNCTION(gd)
 #if defined(USE_GD_JISX0208)  defined(HAVE_GD_BUNDLED)
php_info_print_table_row(2, JIS-mapped Japanese Font Support, 
enabled);
 #endif
+#ifdef HAVE_GD_WEBP
+   php_info_print_table_row(2, WebP Support, enabled);
+#endif
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: conflict: ext/gd/gd.c ext/gd/libgd/gd.h ext/gd/libgd/gd_interpolation.c

2013-03-26 Thread Pierre Joye
Commit:23af4ff5bba76bc06066375a93c0babf84ac
Author:Pierre Joye pierre@gmail.com Tue, 26 Mar 2013 11:24:00 
+0100
Parents:   b6fa581d2de04b850129ad669b44865de4aef429 
5ae6f582fb9af6e93ecd7001646553ae98be6275
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=23af4ff5bba76bc06066375a93c0babf84ac

Log:
conflict

Changed paths:
  MM  ext/gd/gd.c
  MM  ext/gd/libgd/gd.h
  MM  ext/gd/libgd/gd_interpolation.c


Diff:
diff --cc ext/gd/gd.c
index e1ac2b9,23a6ec9..c5a7fc8
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@@ -2271,11 -2263,7 +2271,7 @@@ PHP_FUNCTION(imagerotate
  
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd);
  
-   if (color  0) {
-   RETURN_FALSE;
-   }
- 
 -  im_dst = gdImageRotateInterpolated(im_src, (float)degrees, color);
 +  im_dst = gdImageRotateInterpolated(im_src, (const float)degrees, color);
  
if (im_dst != NULL) {
ZEND_REGISTER_RESOURCE(return_value, im_dst, le_gd);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix regression, take #2 (merge issue due to git 1.8 default setting changes): ext/gd/gd.c ext/gd/libgd/gd.h ext/gd/libgd/gd_interpolation.c

2013-03-26 Thread Pierre Joye
Commit:5ae6f582fb9af6e93ecd7001646553ae98be6275
Author:Pierre Joye pierre@gmail.com Tue, 26 Mar 2013 11:23:15 
+0100
Parents:   c6e911e1549ba23158249ef1c0e6f27dcc6c88bb
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5ae6f582fb9af6e93ecd7001646553ae98be6275

Log:
fix regression, take #2 (merge issue due to git 1.8 default setting changes)

Bugs:
https://bugs.php.net/2

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd.h
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index caf84e3..23a6ec9 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2263,7 +2263,7 @@ PHP_FUNCTION(imagerotate)
 
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd);
 
-   im_dst = gdImageRotateGeneric(im_src, (float)degrees, color);
+   im_dst = gdImageRotateInterpolated(im_src, (float)degrees, color);
 
if (im_dst != NULL) {
ZEND_REGISTER_RESOURCE(return_value, im_dst, le_gd);
diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h
index 28c8562..0bd8ad3 100644
--- a/ext/gd/libgd/gd.h
+++ b/ext/gd/libgd/gd.h
@@ -690,6 +690,7 @@ gdImagePtr gdImageRotate180(gdImagePtr src, int 
ignoretransparent);
 gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent);
 gdImagePtr gdImageRotate45(gdImagePtr src, double dAngle, int clrBack, int 
ignoretransparent);
 gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int 
ignoretransparent);
+gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, 
int bgcolor);
 
 void gdImageSetBrush(gdImagePtr im, gdImagePtr brush);
 void gdImageSetTile(gdImagePtr im, gdImagePtr tile);
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index c88dc72..d805ec9 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -2166,6 +2166,10 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, 
const float degrees, const
 gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, 
int bgcolor)
 {
const int angle_rounded = (int)floor(angle * 100);
+   
+   if (bgcolor  0) {
+   return NULL;
+   }
 
/* no interpolation needed here */
switch (angle_rounded) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: merging conflict left over: ext/gd/libgd/gd_interpolation.c

2013-03-26 Thread Pierre Joye
Commit:8a85da4a61c53f012174633ea7cef38cac6cfcbe
Author:Pierre Joye pierre@gmail.com Tue, 26 Mar 2013 17:46:29 
+0100
Parents:   3b48dc08489a2bde318836cc57c9e2c743bca5cb
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8a85da4a61c53f012174633ea7cef38cac6cfcbe

Log:
merging conflict left over

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 4de9531..47ba5e3 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -2213,7 +2213,6 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr 
src, const float angle, in
break;
 
default:
-   gdImageRotateGeneric(src, angle, bgcolor);
return gdImageRotateGeneric(src, angle, bgcolor);
}
return NULL;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-26 Thread Pierre Joye
Commit:705ab202522bda22e0bda2370ac9591fe3c83cb8
Author:Pierre Joye pierre@gmail.com Wed, 27 Mar 2013 05:13:42 
+0100
Parents:   8a85da4a61c53f012174633ea7cef38cac6cfcbe 
f3ebb40ad6041e9c29e165f9d7017fb50063129f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=705ab202522bda22e0bda2370ac9591fe3c83cb8

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  FALSE on error

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: FALSE on error: ext/gd/gd.c

2013-03-26 Thread Pierre Joye
Commit:f3ebb40ad6041e9c29e165f9d7017fb50063129f
Author:Pierre Joye pierre@gmail.com Wed, 27 Mar 2013 05:13:30 
+0100
Parents:   4d73bb070ee90336984f275eb24f7d1ca1cff1ea
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f3ebb40ad6041e9c29e165f9d7017fb50063129f

Log:
 FALSE on error

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 23a6ec9..3ce1a2c 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1814,7 +1814,7 @@ PHP_FUNCTION(imagepalettetotruecolor)
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
 
if (gdImagePaletteToTrueColor(im) == 0) {
-   RETURN_TRUE;
+   RETURN_FALSE;
}
 
RETURN_TRUE;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: add new functions and constants for GD: UPGRADING

2013-03-25 Thread Pierre Joye
Commit:1c662dc303b1d007af0b3df0a58fbf3f01759f72
Author:Pierre Joye pierre@gmail.com Mon, 25 Mar 2013 12:15:46 
+0100
Parents:   439424988148aa9bb4ecabcb6b0f6ac89614f9b1
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1c662dc303b1d007af0b3df0a58fbf3f01759f72

Log:
add new functions and constants for GD

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index 350d147..c85ea54 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -153,6 +153,11 @@ PHP 5.5 UPGRADE NOTES
   - imageflip
   - imagecrop
   - imagecropauto
+  - imagesetinterpolation
+  - imageaffine
+  - imageaffinematrixget
+  - imageaffinematrixconcat
+  - imagescale
 
 - Hash:
   - hash_pbkdf2()
@@ -303,6 +308,35 @@ PHP 5.5 UPGRADE NOTES
 . IMG_CROP_WHITE
 . IMG_CROP_SIDES
 . IMG_CROP_THRESHOLD
+  - Added constants for imagesetinterpolation, used bz imagescale
+imagerotate and imageaffine:
+. IMG_BELL
+. IMG_BESSEL
+. IMG_BILINEAR_FIXED
+. IMG_BICUBIC
+. IMG_BICUBIC_FIXED
+. IMG_BLACKMAN
+. IMG_BOX
+. IMG_BSPLINE
+. IMG_CATMULLROM
+. IMG_GAUSSIAN
+. IMG_GENERALIZED_CUBIC
+. IMG_HERMITE
+. IMG_HAMMING
+. IMG_HANNING
+. IMG_MITCHELL
+. IMG_POWER
+. IMG_QUADRATIC
+. IMG_SINC
+. IMG_NEAREST_NEIGHBOUR
+. IMG_WEIGHTED4
+. IMG_TRIANGLE
+
+IMG_AFFINE_TRANSLATE
+IMG_AFFINE_SCALE
+IMG_AFFINE_ROTATE
+IMG_AFFINE_SHEAR_HORIZONTAL
+IMG_AFFINE_SHEAR_VERTICAL
 
 
 10. Changes to INI File Handling


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: conflict: Zend/zend_ini_scanner.c Zend/zend_ini_scanner_defs.h Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h

2013-03-25 Thread Pierre Joye
Commit:7da6272fe7d0a99fb2713c4fab3d0367c96d3490
Author:Pierre Joye pierre@gmail.com Mon, 25 Mar 2013 12:20:01 
+0100
Parents:   52b4a251b72f7859c2c5584cfa63449c3bb31489 
1c662dc303b1d007af0b3df0a58fbf3f01759f72
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7da6272fe7d0a99fb2713c4fab3d0367c96d3490

Log:
conflict

Changed paths:
  MM  Zend/zend_ini_scanner.c
  MM  Zend/zend_ini_scanner_defs.h
  MM  Zend/zend_language_scanner.c
  MM  Zend/zend_language_scanner_defs.h


Diff: Diff exceeded maximum size

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: sapi/cli/php_cli_server.c

2013-03-24 Thread Pierre Joye
Commit:0179284bfb07b4e8ac08d37bf5b47f97a814b023
Author:Pierre Joye pierre@gmail.com Sun, 24 Mar 2013 13:29:16 
+0100
Parents:   ec26141f928d380cf5a3c3b9b2c4d858b9a39254 
bb18fa448c104c10d0899090bf64ca66e36e492e
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0179284bfb07b4e8ac08d37bf5b47f97a814b023

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  - add reminder for checking return values

Changed paths:
  MM  sapi/cli/php_cli_server.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add reminder for checking return values: sapi/cli/php_cli_server.c

2013-03-24 Thread Pierre Joye
Commit:bb18fa448c104c10d0899090bf64ca66e36e492e
Author:Pierre Joye pierre@gmail.com Sun, 24 Mar 2013 13:27:00 
+0100
Parents:   3af489683753ab31d7397812989e82f6a424d244
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bb18fa448c104c10d0899090bf64ca66e36e492e

Log:
- add reminder for checking return values

Changed paths:
  M  sapi/cli/php_cli_server.c


Diff:
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index e834e75..903f042 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -315,6 +315,8 @@ int php_cli_server_get_system_time(char *buf) {
struct tm tm;
 
gettimeofday(tv, NULL);
+
+   /* TODO: should be checked for NULL tm/return vaue */
php_localtime_r(tv.tv_sec, tm);
php_asctime_r(tm, buf);
return 0;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix generic rotation and 90 degrees multiples rotation, take #2: ext/gd/libgd/gd_interpolation.c

2013-03-24 Thread Pierre Joye
Commit:be3e2bb295d58297ce7e8a3ee05cbf2112eb0138
Author:Pierre Joye pierre@gmail.com Sun, 24 Mar 2013 16:52:20 
+0100
Parents:   585f71f497804614a4c3d5da86f2797c32ca3def
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=be3e2bb295d58297ce7e8a3ee05cbf2112eb0138

Log:
fix generic rotation and 90 degrees  multiples rotation, take #2

Bugs:
https://bugs.php.net/2

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index ab3e988..15b5415 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -2177,6 +2177,17 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, 
const float degrees, const
 
 gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, 
int bgcolor)
 {
+   const int angle_rounded = (int)floor(angle * 100);
+
+   /* no interpolation needed here */
+   switch (angle_rounded) {
+   case 9000:
+   return gdImageRotate90(src, 0);
+   case 18000:
+   return gdImageRotate180(src, 0);
+   case 27000:
+   return gdImageRotate270(src, 0);
+   }
 
if (src == NULL || src-interpolation_id  1 || src-interpolation_id  
GD_METHOD_COUNT) {
return NULL;
@@ -2191,47 +2202,12 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr 
src, const float angle, in
return gdImageRotateBilinear(src, angle, bgcolor);
break;
 
-   case GD_BICUBIC:
-   return gdImageRotateBicubicFixed(src, angle, bgcolor);
-   break;
-
case GD_BICUBIC_FIXED:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_WEIGHTED4:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_BSPLINE:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_BOX:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_HERMITE:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
+   return gdImageRotateBicubicFixed(src, angle, bgcolor);
break;
 
-   case GD_HAMMING:
-   break;
-   case GD_SINC:
-   break;
-   case GD_BLACKMAN:
-   break;
-
-   case GD_GAUSSIAN:
-   break;
-   case GD_QUADRATIC:
-   break;
-   case GD_MITCHELL:
-   break;
-   case GD_CATMULLROM:
-   break;
-   case GD_POWER:
-   break;
+   default:
+   return gdImageRotateGeneric(src, angle, bgcolor);
}
return NULL;
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix conflict: ext/gd/libgd/gd_interpolation.c

2013-03-24 Thread Pierre Joye
Commit:94c083ba645c77faa677c2ced7e2b5e8b94c3ebc
Author:Pierre Joye pierre@gmail.com Sun, 24 Mar 2013 16:54:55 
+0100
Parents:   453bcfecbfdd95e5e5449b7d0ae8f6f0cb5b1cea 
be3e2bb295d58297ce7e8a3ee05cbf2112eb0138
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=94c083ba645c77faa677c2ced7e2b5e8b94c3ebc

Log:
fix conflict

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:
diff --cc ext/gd/libgd/gd_interpolation.c
index e1c8728,15b5415..77d7dd1
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@@ -2220,7 -2207,7 +2221,8 @@@ gdImagePtr gdImageRotateInterpolated(co
break;
  
default:
 +  gdImageRotateGeneric(src, angle, bgcolor);
+   return gdImageRotateGeneric(src, angle, bgcolor);
}
return NULL;
  }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/libgd/gd_interpolation.c

2013-03-24 Thread Pierre Joye
Commit:f21f37bb4c37d13bdfc81c96cbe12608d7e69e05
Author:Pierre Joye pierre@gmail.com Mon, 25 Mar 2013 03:14:40 
+0100
Parents:   94c083ba645c77faa677c2ced7e2b5e8b94c3ebc 
1b34ab8ff89d9710fa03245e868bd13254138ca6
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f21f37bb4c37d13bdfc81c96cbe12608d7e69e05

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  remove comments

Changed paths:
  MM  ext/gd/libgd/gd_interpolation.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix x64 issues on windows with the various time types (overflow, signed and unsigned bits ops, etc.) causing crashes on start, error or log, must be done in win32/time.c for s

2013-03-23 Thread Pierre Joye
Commit:e6a9d1ca8d13c66c524ff0d34ef97f350da6d3a6
Author:Pierre Joye pierre@gmail.com Sat, 23 Mar 2013 10:18:31 
+0100
Parents:   cfd096fd7cc7e48e052f7309780a0bed257ed524
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e6a9d1ca8d13c66c524ff0d34ef97f350da6d3a6

Log:
- fix x64 issues on windows with the various time types (overflow, signed and 
unsigned bits ops, etc.) causing crashes on start, error or log, must be done 
in win32/time.c for some of these functions too

Changed paths:
  M  sapi/cli/php_cli_server.c


Diff:
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index ab7f4cf..e834e75 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -24,11 +24,12 @@
 #include assert.h
 
 #ifdef PHP_WIN32
-#include process.h
-#include io.h
-#include win32/time.h
-#include win32/signal.h
-#include win32/php_registry.h
+# include process.h
+# include io.h
+# include win32/time.h
+# include win32/signal.h
+# include win32/php_registry.h
+# include sys/timeb.h
 #else
 # include php_config.h
 #endif
@@ -292,6 +293,34 @@ static const char php_cli_server_css[] = style\n \

/style\n;
 /* }}} */
 
+#ifdef PHP_WIN32
+int php_cli_server_get_system_time(char *buf) {
+   struct _timeb system_time;
+   errno_t err;
+
+   if (buf == NULL) {
+   return -1;
+   }
+
+   _ftime(system_time);
+   err = ctime_s(buf, 52, (system_time.time) );
+   if (err) {
+   return -1;
+   }
+   return 0;
+}
+#else
+int php_cli_server_get_system_time(char *buf) {
+   struct timeval tv;
+   struct tm tm;
+
+   gettimeofday(tv, NULL);
+   php_localtime_r(tv.tv_sec, tm);
+   php_asctime_r(tm, buf);
+   return 0;
+}
+#endif
+
 static void char_ptr_dtor_p(char **p) /* {{{ */
 {
pefree(*p, 1);
@@ -630,13 +659,11 @@ static void sapi_cli_server_register_variables(zval 
*track_vars_array TSRMLS_DC)
 
 static void sapi_cli_server_log_message(char *msg TSRMLS_DC) /* {{{ */
 {
-   struct timeval tv;
-   struct tm tm;
char buf[52];
-   gettimeofday(tv, NULL);
-   php_localtime_r(tv.tv_sec, tm);
-   php_asctime_r(tm, buf);
-   {
+
+   if (php_cli_server_get_system_time(buf) != 0) {
+   memmove(buf, unknown time, can't be fetched, sizeof(unknown 
time, can't be fetched));
+   } else {
size_t l = strlen(buf);
if (l  0) {
buf[l - 1] = '\0';
@@ -2394,12 +2421,12 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* 
{{{ */
sapi_module.phpinfo_as_text = 0;
 
{
-   struct timeval tv;
-   struct tm tm;
char buf[52];
-   gettimeofday(tv, NULL);
-   php_localtime_r(tv.tv_sec, tm);
-   php_asctime_r(tm, buf);
+
+   if (php_cli_server_get_system_time(buf) != 0) {
+   memmove(buf, unknown time, can't be fetched, 
sizeof(unknown time, can't be fetched));
+   }
+
printf(PHP %s Development Server started at %s
Listening on http://%s\n;
Document root is %s\n


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: sapi/cli/php_cli_server.c

2013-03-23 Thread Pierre Joye
Commit:4a9eb328eee63f9580f2782c582f1959cf9665e3
Author:Pierre Joye pierre@gmail.com Sat, 23 Mar 2013 10:21:22 
+0100
Parents:   f39a23696ba89d0dc77f7715f04ca7d1aa5b696e 
e6a9d1ca8d13c66c524ff0d34ef97f350da6d3a6
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4a9eb328eee63f9580f2782c582f1959cf9665e3

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  - fix x64 issues on windows with the various time types (overflow, signed and 
unsigned bits ops, etc.) causing crashes on start, error or log, must be done 
in win32/time.c for some of these functions too

Changed paths:
  MM  sapi/cli/php_cli_server.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix regression (imagerotate_overflow.phpt): ext/gd/gd.c ext/gd/libgd/gd_interpolation.c

2013-03-22 Thread Pierre Joye
Commit:4e6d54f5a7003b73f12d86d7f5cba0a37ce40930
Author:Pierre Joye pierre@gmail.com Fri, 22 Mar 2013 08:28:11 
+0100
Parents:   15ecea760284008ec755ab467f97d3987cca80fb
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4e6d54f5a7003b73f12d86d7f5cba0a37ce40930

Log:
- fix regression (imagerotate_overflow.phpt)

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index caf84e3..e291793 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -83,6 +83,10 @@ static void php_free_ps_enc(zend_rsrc_list_entry *rsrc 
TSRMLS_DC);
 # endif
 #endif
 
+#if defined(HAVE_GD_XPM)  defined(HAVE_GD_BUNDLED)
+# include X11/xpm.h
+#endif
+
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
 #endif
@@ -124,6 +128,10 @@ int gdImageColorClosestHWB(gdImagePtr im, int r, int g, 
int b);
 #define gdNewDynamicCtxEx(len, data, val) gdNewDynamicCtx(len, data)
 #endif
 
+/* as it is not really public, duplicate declaration here to avoid 
+   pointless warnings */
+int overflow2(int a, int b);
+
 /* Section Filters Declarations */
 /* IMPORTANT NOTE FOR NEW FILTER
  * Do not forget to update:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 5ad5de6..c44f504 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1750,6 +1750,10 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const 
float degrees, const int b
f_slop_x  f_slop_y ? 
gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)
: 0;
 
+   if (bgColor  0) {
+   return NULL;
+   }
+
/* impact perf a bit, but not that much. Implementation for palette
   images can be done at a later point.
*/


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-22 Thread Pierre Joye
Commit:2a8a9c0007f4025d33693ec45a106adb81fc1376
Author:Pierre Joye pierre@gmail.com Fri, 22 Mar 2013 08:28:25 
+0100
Parents:   fa161e9a67b58a3a2f4dbebedce21c923ab80af1 
4e6d54f5a7003b73f12d86d7f5cba0a37ce40930
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2a8a9c0007f4025d33693ec45a106adb81fc1376

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - fix regression (imagerotate_overflow.phpt)

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-22 Thread Pierre Joye
Commit:672f8525fbabf971afeebeed0c9d97aa760724c7
Author:Pierre Joye pierre@gmail.com Fri, 22 Mar 2013 09:21:23 
+0100
Parents:   6512c44d8e645a8969b4c7cac55ca768b50cc5f6 
f05972ddbf703da35ae9bde5c89d6f55f178b939
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=672f8525fbabf971afeebeed0c9d97aa760724c7

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - fix regression bug24155.phpt and bug39366.phpt

Bugs:
https://bugs.php.net/24155
https://bugs.php.net/39366

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix regression bug24155.phpt and bug39366.phpt: ext/gd/gd.c ext/gd/libgd/gd.h ext/gd/libgd/gd_interpolation.c

2013-03-22 Thread Pierre Joye
Commit:f05972ddbf703da35ae9bde5c89d6f55f178b939
Author:Pierre Joye pierre@gmail.com Fri, 22 Mar 2013 09:21:11 
+0100
Parents:   4e6d54f5a7003b73f12d86d7f5cba0a37ce40930
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f05972ddbf703da35ae9bde5c89d6f55f178b939

Log:
- fix regression bug24155.phpt and bug39366.phpt

Bugs:
https://bugs.php.net/24155
https://bugs.php.net/39366

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd.h
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index e291793..58027d7 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2271,7 +2271,7 @@ PHP_FUNCTION(imagerotate)
 
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd);
 
-   im_dst = gdImageRotateGeneric(im_src, (float)degrees, color);
+   im_dst = gdImageRotateInterpolated(im_src, (const float)degrees, color);
 
if (im_dst != NULL) {
ZEND_REGISTER_RESOURCE(return_value, im_dst, le_gd);
diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h
index 28c8562..44c7c8a 100644
--- a/ext/gd/libgd/gd.h
+++ b/ext/gd/libgd/gd.h
@@ -844,8 +844,7 @@ gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, 
const float degrees, co
 gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const 
int bgColor);
 gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, 
const int bgColor);
 gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int 
bgColor);
-
-
+gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, 
int bgcolor);
 
 typedef enum {
GD_AFFINE_TRANSLATE = 0,
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index c44f504..0215c23 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1729,6 +1729,7 @@ gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, 
const float degrees, co
 gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int 
bgColor)
 {
float _angle = ((float) (-degrees / 180.0f) * (float)M_PI);
+   const int angle_rounded = (int)floor(degrees * 100);
const int src_w  = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * 
cos(_angle))) + abs((int)(src_h * sin(_angle))) + 0.5f);
@@ -2194,6 +2195,16 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, 
const float degrees, const
 
 gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, 
int bgcolor)
 {
+   const int angle_rounded = (int)floor(angle * 100);
+
+   switch (angle_rounded) {
+   case 9000:
+   return gdImageRotate90(src, 0);
+   case 18000:
+   return gdImageRotate180(src, 0);
+   case 27000:
+   return gdImageRotate270(src, 0);
+   }
 
if (src == NULL || src-interpolation_id  1 || src-interpolation_id  
GD_METHOD_COUNT) {
return NULL;
@@ -2208,47 +2219,12 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr 
src, const float angle, in
return gdImageRotateBilinear(src, angle, bgcolor);
break;
 
-   case GD_BICUBIC:
-   return gdImageRotateBicubicFixed(src, angle, bgcolor);
-   break;
-
case GD_BICUBIC_FIXED:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_WEIGHTED4:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_BSPLINE:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_BOX:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
-   break;
-
-   case GD_HERMITE:
-   return gdImageRotateNearestNeighbour(src, angle, 
bgcolor);
+   return gdImageRotateBicubicFixed(src, angle, bgcolor);
break;
 
-   case GD_HAMMING:
-   break;
-   case GD_SINC:
-   break;
-   case GD_BLACKMAN:
-   break;
-
-   case GD_GAUSSIAN:
-   break;
-   case GD_QUADRATIC:
-   break;
-   case GD_MITCHELL:
-   break;
-   case GD_CATMULLROM:
-   break;
-   case GD_POWER:
-   break;
+   default:
+   gdImageRotateGeneric(src, angle, bgcolor);
}
return NULL;
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix regression (imagerotate_overflow.phpt), fix for all cases: ext/gd/gd.c ext/gd/libgd/gd_interpolation.c

2013-03-22 Thread Pierre Joye
Commit:f39a23696ba89d0dc77f7715f04ca7d1aa5b696e
Author:Pierre Joye pierre@gmail.com Fri, 22 Mar 2013 09:30:23 
+0100
Parents:   f05972ddbf703da35ae9bde5c89d6f55f178b939
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f39a23696ba89d0dc77f7715f04ca7d1aa5b696e

Log:
- fix regression (imagerotate_overflow.phpt), fix for all cases

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 58027d7..74ce32c 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2271,6 +2271,10 @@ PHP_FUNCTION(imagerotate)
 
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd);
 
+   if (color  0) {
+   RETURN_FALSE;
+   }
+
im_dst = gdImageRotateInterpolated(im_src, (const float)degrees, color);
 
if (im_dst != NULL) {
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 0215c23..e1c8728 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -825,10 +825,6 @@ int getPixelInterpolated(gdImagePtr im, const double x, 
const double y, const in
return -1;
}
 
-   /* Default to full alpha */
-   if (bgColor == -1) {
-   }
-
if (im-interpolation_id == GD_WEIGHTED4) {
return getPixelInterpolateWeight(im, x, y, bgColor);
}


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-22 Thread Pierre Joye
Commit:dd9e4b34d67eccc66eca17ef4c9e12d6b410303d
Author:Pierre Joye pierre@gmail.com Fri, 22 Mar 2013 09:30:32 
+0100
Parents:   672f8525fbabf971afeebeed0c9d97aa760724c7 
f39a23696ba89d0dc77f7715f04ca7d1aa5b696e
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=dd9e4b34d67eccc66eca17ef4c9e12d6b410303d

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - fix regression (imagerotate_overflow.phpt), fix for all cases

Changed paths:
  MM  ext/gd/gd.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - config.m4 sync with .w32: ext/gd/config.m4

2013-03-20 Thread Pierre Joye
Commit:00a53ca817fcc5bca852e5ed65ee4136210601a2
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 07:52:23 
+0100
Parents:   22159fb7b7324c3d4bb9fe00d3d2ce575a15743d
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=00a53ca817fcc5bca852e5ed65ee4136210601a2

Log:
- config.m4 sync with .w32

Changed paths:
  M  ext/gd/config.m4


Diff:
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index 2f71705..e6cc036 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -298,7 +298,7 @@ if test $PHP_GD = yes; then
  libgd/gdcache.c libgd/gdkanji.c libgd/wbmp.c libgd/gd_wbmp.c 
libgd/gdhelpers.c \
  libgd/gd_topal.c libgd/gd_gif_in.c libgd/xbm.c 
libgd/gd_gif_out.c libgd/gd_security.c \
  libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_arc.c 
libgd/gd_rotate.c libgd/gd_color.c \
-libgd/gd_transform.c libgd/gd_crop.c
+libgd/gd_transform.c libgd/gd_crop.c 
libgd/gd_interpolation.c libgd/gd_matrix.c
 
 dnl check for fabsf and floorf which are available since C99
   AC_CHECK_FUNCS(fabsf floorf)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix unix build: ext/gd/libgd/gd_interpolation.c

2013-03-20 Thread Pierre Joye
Commit:a46065ef7105514cc9b866b907ae6dd0ad529d25
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 09:24:54 
+0100
Parents:   a7a53d369bfcf3208b445b9aa12aa8a6e114c5fd
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=a46065ef7105514cc9b866b907ae6dd0ad529d25

Log:
- fix unix build

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 29dbe19..b2c6f41 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -925,7 +925,7 @@ static inline LineContribType 
*_gdContributionsCalc(unsigned int line_size, unsi
 for (u = 0; u  line_size; u++) {
 const double dCenter = (double)u / scale_d;
 /* get the significant edge points affecting the pixel */
-register int iLeft = max (0, (int)floor (dCenter - width_d));
+register int iLeft = MAX(0, (int)floor (dCenter - width_d));
 int iRight = MIN((int)ceil(dCenter + width_d), (int)src_size - 1);
 double dTotalWeight = 0.0;
int iSrc;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add imageaffinematrixget and imagematrixconcat: ext/gd/gd.c ext/gd/libgd/gd_interpolation.c ext/gd/php_gd.h

2013-03-20 Thread Pierre Joye
Commit:1ec484d3c536e85bc536e809a403ce5e7d7849d8
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 12:19:03 
+0100
Parents:   780c6e0a9cedb8dbecf5e4aca00996c73c0723d5
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1ec484d3c536e85bc536e809a403ce5e7d7849d8

Log:
- add imageaffinematrixget and imagematrixconcat

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd_interpolation.c
  M  ext/gd/php_gd.h


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 038f7c4..caf84e3 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -918,12 +918,17 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageaffine, 0)
ZEND_ARG_INFO(0, affine)
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_INFO(arginfo_imageaffinegetmatrix, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_imageaffinematrixget, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, matrox)
ZEND_ARG_INFO(0, options)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO(arginfo_imageaffinematrixconcat, 0)
+   ZEND_ARG_INFO(0, m1)
+   ZEND_ARG_INFO(0, m2)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO(arginfo_imagesetinterpolation, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, method)
@@ -994,7 +999,8 @@ const zend_function_entry gd_functions[] = {
PHP_FE(imagecropauto,   
arginfo_imagecropauto)
PHP_FE(imagescale,  
arginfo_imagescale)
PHP_FE(imageaffine, 
arginfo_imageaffine)
-   PHP_FE(imageaffinegetmatrix,
arginfo_imageaffinegetmatrix)
+   PHP_FE(imageaffinematrixconcat, 
arginfo_imageaffinematrixconcat)
+   PHP_FE(imageaffinematrixget,
arginfo_imageaffinematrixget)
PHP_FE(imagesetinterpolation,   
arginfo_imagesetinterpolation)
 #endif
 
@@ -1280,7 +1286,13 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_NEAREST_NEIGHBOUR, GD_NEAREST_NEIGHBOUR, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_WEIGHTED4, GD_WEIGHTED4, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_TRIANGLE, GD_TRIANGLE, CONST_CS | 
CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(IMG_DEFAULT,  GD_BICUBIC_FIXED, CONST_CS | 
CONST_PERSISTENT);
+
+   REGISTER_LONG_CONSTANT(IMG_AFFINE_TRANSLATE, GD_AFFINE_TRANSLATE, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_AFFINE_SCALE, GD_AFFINE_SCALE, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_AFFINE_ROTATE, GD_AFFINE_ROTATE, CONST_CS 
| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_AFFINE_SHEAR_HORIZONTAL, 
GD_AFFINE_SHEAR_HORIZONTAL, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_AFFINE_SHEAR_VERTICAL, 
GD_AFFINE_SHEAR_VERTICAL, CONST_CS | CONST_PERSISTENT);
+
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif
@@ -5488,26 +5500,24 @@ PHP_FUNCTION(imageaffine)
 }
 /* }}} */
 
-/* {{{ proto array imageaffinegetmatrix(type[, options])
+/* {{{ proto array imageaffinematrixget(type[, options])
Return an image containing the affine tramsformed src image, using an 
optional clipping area */
-PHP_FUNCTION(imageaffinegetmatrix)
+PHP_FUNCTION(imageaffinematrixget)
 {
double affine[6];
gdAffineStandardMatrix type;
zval *options;
zval **tmp;
-   int args_required;
-   int res;
+   int res, i;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|z, type, 
options) == FAILURE)  {
return;
}
-   
+
switch(type) {
case GD_AFFINE_TRANSLATE:
case GD_AFFINE_SCALE: {
double x, y;
-   args_required = 2;
if (Z_TYPE_P(options) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Array expected as options);
}
@@ -5557,6 +5567,81 @@ PHP_FUNCTION(imageaffinegetmatrix)
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
type for element %i, type);
RETURN_FALSE;
}
+
+   array_init(return_value);
+   for (i = 0; i  6; i++) {
+   add_index_double(return_value, i, affine[i]);
+   }
+}
+
+
+/* {{{ proto array imageaffineconcat(array m1, array m2)
+   Concat two matrices (as in doing many ops in one go) */
+PHP_FUNCTION(imageaffinematrixconcat)
+{
+   double m1[6];
+   double m2[6];
+   double mr[6];
+
+   zval **tmp;
+   zval *z_m1;
+   zval *z_m2;
+   int i, nelems;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, aa, z_m1, 
z_m2) == FAILURE)  {
+   return;
+   }
+
+   if (((nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m1))) != 6) || 
(nelems = zend_hash_num_elements(Z_ARRVAL_P

[PHP-CVS] com php-src: - add affine matrix helper for translate, scale, rotate and shear: ext/gd/gd.c ext/gd/libgd/gd.h ext/gd/php_gd.h

2013-03-20 Thread Pierre Joye
Commit:780c6e0a9cedb8dbecf5e4aca00996c73c0723d5
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 11:01:37 
+0100
Parents:   a46065ef7105514cc9b866b907ae6dd0ad529d25
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=780c6e0a9cedb8dbecf5e4aca00996c73c0723d5

Log:
- add affine matrix helper for translate, scale, rotate and shear

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd.h
  M  ext/gd/php_gd.h


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index c4cdea3..038f7c4 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -918,6 +918,12 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageaffine, 0)
ZEND_ARG_INFO(0, affine)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO(arginfo_imageaffinegetmatrix, 0)
+   ZEND_ARG_INFO(0, im)
+   ZEND_ARG_INFO(0, matrox)
+   ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO(arginfo_imagesetinterpolation, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, method)
@@ -988,6 +994,7 @@ const zend_function_entry gd_functions[] = {
PHP_FE(imagecropauto,   
arginfo_imagecropauto)
PHP_FE(imagescale,  
arginfo_imagescale)
PHP_FE(imageaffine, 
arginfo_imageaffine)
+   PHP_FE(imageaffinegetmatrix,
arginfo_imageaffinegetmatrix)
PHP_FE(imagesetinterpolation,   
arginfo_imagesetinterpolation)
 #endif
 
@@ -5394,6 +5401,7 @@ PHP_FUNCTION(imageaffine)
double affine[6];
int i, nelems;
zval **zval_affine_elem = NULL;
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ra|a, IM, 
z_affine, z_rect) == FAILURE)  {
return;
}
@@ -5427,6 +5435,7 @@ PHP_FUNCTION(imageaffine)
 
if (z_rect != NULL) {
if (zend_hash_find(HASH_OF(z_rect), x, sizeof(x), (void 
**)tmp) != FAILURE) {
+   convert_to_long_ex(tmp);
rect.x = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing x 
position);
@@ -5434,6 +5443,7 @@ PHP_FUNCTION(imageaffine)
}
 
if (zend_hash_find(HASH_OF(z_rect), y, sizeof(x), (void 
**)tmp) != FAILURE) {
+   convert_to_long_ex(tmp);
rect.y = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing y 
position);
@@ -5441,6 +5451,7 @@ PHP_FUNCTION(imageaffine)
}
 
if (zend_hash_find(HASH_OF(z_rect), width, sizeof(width), 
(void **)tmp) != FAILURE) {
+   convert_to_long_ex(tmp);
rect.width = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing 
width);
@@ -5448,6 +5459,7 @@ PHP_FUNCTION(imageaffine)
}
 
if (zend_hash_find(HASH_OF(z_rect), height, sizeof(height), 
(void **)tmp) != FAILURE) {
+   convert_to_long_ex(tmp);
rect.height = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing 
height);
@@ -5476,6 +5488,77 @@ PHP_FUNCTION(imageaffine)
 }
 /* }}} */
 
+/* {{{ proto array imageaffinegetmatrix(type[, options])
+   Return an image containing the affine tramsformed src image, using an 
optional clipping area */
+PHP_FUNCTION(imageaffinegetmatrix)
+{
+   double affine[6];
+   gdAffineStandardMatrix type;
+   zval *options;
+   zval **tmp;
+   int args_required;
+   int res;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|z, type, 
options) == FAILURE)  {
+   return;
+   }
+   
+   switch(type) {
+   case GD_AFFINE_TRANSLATE:
+   case GD_AFFINE_SCALE: {
+   double x, y;
+   args_required = 2;
+   if (Z_TYPE_P(options) != IS_ARRAY) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Array expected as options);
+   }
+   if (zend_hash_find(HASH_OF(options), x, sizeof(x), 
(void **)tmp) != FAILURE) {
+   convert_to_double_ex(tmp);
+   x = Z_DVAL_PP(tmp);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Missing x position);
+   RETURN_FALSE;
+   }
+
+   if (zend_hash_find(HASH_OF(options), y, sizeof(y), 
(void **)tmp) != FAILURE) {
+   convert_to_double_ex(tmp);
+   y = Z_DVAL_PP(tmp);
+   } else

[PHP-CVS] com php-src: - add new interpolation method . imagescale . imageaffine . replace imagerotate with new generic and optimized new implementations . imagesetinterpolationmethod, to set

2013-03-20 Thread Pierre Joye
Commit:22159fb7b7324c3d4bb9fe00d3d2ce575a15743d
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 07:46:59 
+0100
Parents:   cb76420fe04d6d5531d5f98c1c232696ed4d361c
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=22159fb7b7324c3d4bb9fe00d3d2ce575a15743d

Log:
- add new interpolation method
  . imagescale
  . imageaffine
  . replace imagerotate with new generic and optimized new implementations
  . imagesetinterpolationmethod, to set the default interpolation to be
used with the new functions
  . add imagepalettetotruecolor

Changed paths:
  M  Zend/zend_language_scanner.c
  M  Zend/zend_language_scanner_defs.h
  M  ext/gd/config.w32
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd.c
  M  ext/gd/libgd/gd.h
  M  ext/gd/php_gd.h


Diff: Diff exceeded maximum size

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - update the comment to match the code/features: ext/gd/libgd/gd_interpolation.c

2013-03-20 Thread Pierre Joye
Commit:f0078897c7a76bf9332fb1c19aeb51a9e28bab9f
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 12:29:47 
+0100
Parents:   1ec484d3c536e85bc536e809a403ce5e7d7849d8
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f0078897c7a76bf9332fb1c19aeb51a9e28bab9f

Log:
- update the comment to match the code/features

Changed paths:
  M  ext/gd/libgd/gd_interpolation.c


Diff:
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index ab3e988..5ad5de6 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1,4 +1,5 @@
 /*
+ * The two pass scaling function is based on:
  * Filtered Image Rescaling
  * Based on Gems III
  *  - Schumacher general filtered image rescaling
@@ -13,6 +14,7 @@
  *
  * Initial sources code is avaibable in the Gems Source Code Packages:
  * http://www.acm.org/pubs/tog/GraphicsGems/GGemsIII.tar.gz
+ *
  */
 
 /*
@@ -35,6 +37,17 @@
 */
 
 /*
+   Additional functions are available for simple rotation or 
up/downscaling.
+   downscaling using the fixed point implementations are usually much 
faster
+   than the existing gdImageCopyResampled while having a similar or better
+   quality.
+   
+   For image rotations, the optimized versions have a lazy antialiasing 
for 
+   the edges of the images. For a much better antialiased result, the 
affine
+   function is recommended.
+*/
+
+/*
 TODO:
  - Optimize pixel accesses and loops once we have continuous buffer
  - Add scale support for a portion only of an image (equivalent of 
copyresized/resampled)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/gd.c

2013-03-20 Thread Pierre Joye
Commit:09854f1fb9d4fbd11ef36a1d5cd11eec63569458
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 12:34:51 
+0100
Parents:   83e81c40ae61b66dc9ae1f804ee623fdeca66ac8 
ff7d7bb290176f76a9108c839a38ecf39d4fef87
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=09854f1fb9d4fbd11ef36a1d5cd11eec63569458

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - add gd changes

Conflicts:
UPGRADING

Changed paths:
  MM  ext/gd/gd.c


Diff:
diff --cc ext/gd/gd.c
index caf84e3,caf84e3..e571c04
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@@ -5486,8 -5486,8 +5486,6 @@@ PHP_FUNCTION(imageaffine
pRect = NULL;
}
  
--
--  //int gdTransformAffineGetImage(gdImagePtr *dst, const gdImagePtr src, 
gdRectPtr src_area, const double affine[6]);
if (gdTransformAffineGetImage(dst, src, pRect, affine) != GD_TRUE) {
RETURN_FALSE;
}


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add gd changes: UPGRADING

2013-03-20 Thread Pierre Joye
Commit:ff7d7bb290176f76a9108c839a38ecf39d4fef87
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 12:34:01 
+0100
Parents:   f0078897c7a76bf9332fb1c19aeb51a9e28bab9f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ff7d7bb290176f76a9108c839a38ecf39d4fef87

Log:
- add gd changes

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index ca35a99..3d5fae5 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -182,6 +182,12 @@ PHP 5.5 UPGRADE NOTES
   - imageflip
   - imagecrop
   - imagecropauto
+  - imagescale
+  - imageaffine
+  - imageaffinematrixget
+  - imageaffinematrixconcat
+  - imagesetinterpolation
+  - imagepalettetotruecolor
 
 - Hash:
   - hash_pbkdf2()
@@ -326,6 +332,33 @@ PHP 5.5 UPGRADE NOTES
 . IMG_CROP_WHITE
 . IMG_CROP_SIDES
 . IMG_CROP_THRESHOLD
+ - Added constants for the interpolation function (scale, affine, rotation)
+. IMG_BELL
+. IMG_BESSEL
+. IMG_BILINEAR_FIXED
+. IMG_BICUBIC
+. IMG_BICUBIC_FIXED
+. IMG_BLACKMAN
+. IMG_BOX
+. IMG_BSPLINE
+. IMG_CATMULLROM
+. IMG_GAUSSIAN
+. IMG_GENERALIZED_CUBIC
+. IMG_HERMITE
+. IMG_HAMMING
+. IMG_HANNING
+. IMG_MITCHELL
+. IMG_POWER
+. IMG_QUADRATIC
+. IMG_SINC
+. IMG_NEAREST_NEIGHBOUR
+. IMG_WEIGHTED4
+. IMG_TRIANGLE
+. IMG_AFFINE_TRANSLATE
+. IMG_AFFINE_SCALE
+. IMG_AFFINE_ROTATE
+. IMG_AFFINE_SHEAR_HORIZONTAL
+. IMG_AFFINE_SHEAR_VERTICAL
 
 
 10. Changes to INI File Handling


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - ws: UPGRADING

2013-03-20 Thread Pierre Joye
Commit:15ecea760284008ec755ab467f97d3987cca80fb
Author:Pierre Joye pierre@gmail.com Wed, 20 Mar 2013 12:37:13 
+0100
Parents:   ff7d7bb290176f76a9108c839a38ecf39d4fef87
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=15ecea760284008ec755ab467f97d3987cca80fb

Log:
- ws

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index 3d5fae5..18ed156 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -325,6 +325,7 @@ PHP 5.5 UPGRADE NOTES
 . IMG_FLIP_HORIZONTAL
. IMG_FLIP_VERTICAL
 . IMG_FLIP_BOTH
+
   - Added constants for imagecrop
 . IMG_CROP_DEFAULT
 . IMG_CROP_TRANSPARENT
@@ -332,6 +333,7 @@ PHP 5.5 UPGRADE NOTES
 . IMG_CROP_WHITE
 . IMG_CROP_SIDES
 . IMG_CROP_THRESHOLD
+
  - Added constants for the interpolation function (scale, affine, rotation)
 . IMG_BELL
 . IMG_BESSEL


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Avoid trailing line break: ext/opcache/zend_accelerator_module.c

2013-03-18 Thread Pierre Joye
hi Dmitry,

On Mon, Mar 18, 2013 at 2:40 PM, Dmitry Stogov dmi...@zend.com wrote:
 Hi Andrey,

 I don't think it makes a lot of sense to make it in only this particular
 place.
 We use int in thousands other places (near everywhere across PHP sources).

Well it makes sense and as this code is new, why not make it right in
the 1st place? :)

-- 
Pierre

@pierrejoye

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add noisy php logo for autocrop with threshold test: ext/gd/tests/logo_noise.png

2013-03-04 Thread Pierre Joye
Commit:5001f40e822aa83cdc9d92697c79413562cc184e
Author:Pierre Joye pierre@gmail.com Mon, 4 Mar 2013 12:05:59 
+0100
Parents:   2024ff3b61956f05929f2b87fa259b485cdf0810
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5001f40e822aa83cdc9d92697c79413562cc184e

Log:
- add noisy php logo for autocrop with threshold test

Changed paths:
  A  ext/gd/tests/logo_noise.png


Diff:
diff --git a/ext/gd/tests/logo_noise.png b/ext/gd/tests/logo_noise.png
new file mode 100644
index 000..c9bde52
Binary files /dev/null and b/ext/gd/tests/logo_noise.png differ


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': UPGRADING ext/gd/config.w32

2013-03-04 Thread Pierre Joye
Commit:3e0e64f2082bff83348e3f40e0b3d4d1cdc5922a
Author:Pierre Joye pierre@gmail.com Mon, 4 Mar 2013 12:03:01 
+0100
Parents:   02a15898b263c5dcfb7ca663ab7f3b33deb7a8e1 
2024ff3b61956f05929f2b87fa259b485cdf0810
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3e0e64f2082bff83348e3f40e0b3d4d1cdc5922a

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - add test for imagecropauto
  - (s)rgb distance works way better for now, re enable threshold
  - disable threshold for now, will enable it again using CIEDE2000
  - add todo for threshold
  - clean and enable threshold
  - add image crop support

Conflicts:
UPGRADING

Changed paths:
  MM  UPGRADING
  MM  ext/gd/config.w32


Diff:
diff --cc UPGRADING
index f7eda53,ee1ff67..89107ab
--- a/UPGRADING
+++ b/UPGRADING
@@@ -68,6 -304,25 +68,28 @@@ PHP X.Y UPGRADE NOTE
  9. New Global Constants
  
  
++ HEAD
++===
+ - mysqli:
+   - Added MYSQLI_SERVER_PUBLIC_KEY constant to be used with mysqli_options()
+ 
+ - cURL:
+   - Added CURLOPT_SAFE_UPLOAD to be used with curl_setopt().
+ 
+ - GD
+   - Added constants for imageflip:
+ . IMG_FLIP_HORIZONTAL
+   . IMG_FLIP_VERTICAL
+ . IMG_FLIP_BOTH
+   - Added constants for imagecrop
+ . IMG_CROP_DEFAULT
+ . IMG_CROP_TRANSPARENT
+ . IMG_CROP_BLACK
+ . IMG_CROP_WHITE
+ . IMG_CROP_SIDES
+ . IMG_CROP_THRESHOLD
+ 
++ PHP-5.5
  
  10. Changes to INI File Handling
  


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add test for imagecropauto: UPGRADING ext/gd/tests/imagecrop_auto.phpt

2013-03-04 Thread Pierre Joye
Commit:2024ff3b61956f05929f2b87fa259b485cdf0810
Author:Pierre Joye pierre@gmail.com Mon, 4 Mar 2013 07:26:07 
+0100
Parents:   0a55c4b1dd84382c7d53c460462b78e8ac9c7d8b
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2024ff3b61956f05929f2b87fa259b485cdf0810

Log:
- add test for imagecropauto

Changed paths:
  M  UPGRADING
  A  ext/gd/tests/imagecrop_auto.phpt


Diff:
diff --git a/UPGRADING b/UPGRADING
index 5f7d3ee..ee1ff67 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -177,6 +177,7 @@ PHP 5.5 UPGRADE NOTES
 - GD
   - imageflip
   - imagecrop
+  - imagecropauto
 
 - Hash:
   - hash_pbkdf2()
diff --git a/ext/gd/tests/imagecrop_auto.phpt b/ext/gd/tests/imagecrop_auto.phpt
new file mode 100644
index 000..1860e39
--- /dev/null
+++ b/ext/gd/tests/imagecrop_auto.phpt
@@ -0,0 +1,82 @@
+--TEST-- 
+Testing imagecropauto() 
+--SKIPIF-- 
+?php  
+if ( ! extension_loaded('gd') || !function_exists('imagecrop')) die( 'skip GD 
imagecropauto not present; skipping test' ); 
+? 
+--FILE--
+?php
+
+echo TC IMG_CROP_DEFAULT\n;
+$im = imagecreatetruecolor(99, 99); 
+imagefilledrectangle($im, 20, 20, 30, 30, 0xff);
+$im_crop = imagecropauto($im, IMG_CROP_DEFAULT);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+
+echo Palette IMG_CROP_DEFAULT\n;
+$im = imagecreate(99, 99); 
+imagefilledrectangle($im, 20, 20, 30, 30, 0xff);
+$im_crop = imagecropauto($im, IMG_CROP_DEFAULT);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+
+echo TC IMG_CROP_SIDES\n;
+$im = imagecreatetruecolor(99, 99); 
+imagefilledrectangle($im, 20, 20, 30, 30, 0xff);
+$im_crop = imagecropauto($im, IMG_CROP_SIDES);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+
+echo Palette IMG_CROP_SIDES\n;
+$im = imagecreate(99, 99); 
+imagefilledrectangle($im, 20, 20, 30, 30, 0xff);
+$im_crop = imagecropauto($im, IMG_CROP_SIDES);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+
+echo TC IMG_CROP_BLACK\n;
+$im = imagecreatetruecolor(50, 50);
+imagefilledrectangle($im, 20, 20, 30, 30, 0xff);
+$im_crop = imagecropauto($im, IMG_CROP_BLACK);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+
+echo Palette IMG_CROP_BLACK\n;
+$im = imagecreate(50, 50);
+$bgd = imagecolorallocate($im, 0, 0, 0);
+$b = imagecolorallocate($im, 0, 0, 255);
+imagefilledrectangle($im, 20, 20, 30, 30, 0xff);
+$im_crop = imagecropauto($im, IMG_CROP_BLACK);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+
+echo IMG_CROP_THRESHOLD\n;
+$im = imagecreatefrompng(logo_noise.png);
+$im_crop = imagecropauto($im, IMG_CROP_THRESHOLD, 0.1, 0x0);
+imagepng($im_crop, __DIR__ . /crop_threshold.png);
+var_dump(imagesx($im_crop));
+var_dump(imagesy($im_crop));
+? 
+--EXPECT-- 
+TC IMG_CROP_DEFAULT
+int(11)
+int(11)
+Palette IMG_CROP_DEFAULT
+int(11)
+int(11)
+TC IMG_CROP_SIDES
+int(11)
+int(11)
+Palette IMG_CROP_SIDES
+int(11)
+int(11)
+TC IMG_CROP_BLACK
+int(11)
+int(11)
+Palette IMG_CROP_BLACK
+int(11)
+int(11)
+IMG_CROP_THRESHOLD
+int(240)
+int(134)
\ No newline at end of file


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - (s)rgb distance works way better for now, re enable threshold: ext/gd/gd.c ext/gd/libgd/gd_crop.c

2013-03-04 Thread Pierre Joye
Commit:0a55c4b1dd84382c7d53c460462b78e8ac9c7d8b
Author:Pierre Joye pierre@gmail.com Sun, 3 Mar 2013 05:30:12 
+0100
Parents:   7698bc5735d188964cb98e6b6387c4cca26fcb0e
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0a55c4b1dd84382c7d53c460462b78e8ac9c7d8b

Log:
- (s)rgb distance works way better for now, re enable threshold

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd_crop.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 7a2e214..be9501e 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1224,10 +1224,7 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_CROP_BLACK, GD_CROP_BLACK, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_CROP_WHITE, GD_CROP_WHITE, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_CROP_SIDES, GD_CROP_SIDES, CONST_CS | 
CONST_PERSISTENT);
-#ifdef GD_ENABLE_CROP_THRESHOLD
REGISTER_LONG_CONSTANT(IMG_CROP_THRESHOLD, GD_CROP_THRESHOLD, 
CONST_CS | CONST_PERSISTENT);
-#endif
-
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif
@@ -5160,39 +5157,39 @@ PHP_FUNCTION(imagecrop)
double threshold = 0.5f;
gdImagePtr im;
gdImagePtr im_crop;
-   HashTable rect_hash;
gdRect rect;
+   zval *z_rect;
zval **tmp;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|h, IM, 
rect_hash) == FAILURE)  {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|a, IM, 
z_rect) == FAILURE)  {
return;
}
 
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
 
-   if (zend_hash_find(rect_hash, x, strlen(x), (void **)tmp) != 
FAILURE) {
+   if (zend_hash_find(HASH_OF(z_rect), x, sizeof(x), (void **)tmp) != 
FAILURE) {
rect.x = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing x 
position);
RETURN_FALSE;
}
 
-   if (zend_hash_find(rect_hash, y, strlen(x), (void **)tmp) != 
FAILURE) {
+   if (zend_hash_find(HASH_OF(z_rect), y, sizeof(x), (void **)tmp) != 
FAILURE) {
rect.y = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing y 
position);
RETURN_FALSE;
}
 
-   if (zend_hash_find(rect_hash, width, strlen(x), (void **)tmp) != 
FAILURE) {
+   if (zend_hash_find(HASH_OF(z_rect), width, sizeof(width), (void 
**)tmp) != FAILURE) {
rect.width = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing width);
RETURN_FALSE;
}
 
-   if (zend_hash_find(rect_hash, height, strlen(x), (void **)tmp) != 
FAILURE) {
-   rect.width = Z_LVAL_PP(tmp);
+   if (zend_hash_find(HASH_OF(z_rect), height, sizeof(height), (void 
**)tmp) != FAILURE) {
+   rect.height = Z_LVAL_PP(tmp);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing height);
RETURN_FALSE;
@@ -5200,9 +5197,6 @@ PHP_FUNCTION(imagecrop)
 
im_crop = gdImageCrop(im, rect);
 
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown flip mode);
-   RETURN_FALSE;
-
if (im_crop == NULL) {
RETURN_FALSE;
} else {
@@ -5238,7 +5232,7 @@ PHP_FUNCTION(imagecropauto)
case GD_CROP_SIDES:
im_crop = gdImageCropAuto(im, mode);
break;
-#ifdef GD_ENABLE_CROP_THRESHOLD
+
case GD_CROP_THRESHOLD:
if (color  0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Color argument missing with threshold mode);
@@ -5246,7 +5240,7 @@ PHP_FUNCTION(imagecropauto)
}
im_crop = gdImageCropThreshold(im, color, (float) 
threshold);
break;
-#endif
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
flip mode);
RETURN_FALSE;
diff --git a/ext/gd/libgd/gd_crop.c b/ext/gd/libgd/gd_crop.c
index 562098f..9ce4827 100644
--- a/ext/gd/libgd/gd_crop.c
+++ b/ext/gd/libgd/gd_crop.c
@@ -22,6 +22,7 @@
 #include gd.h
 #include stdlib.h
 #include string.h
+#include math.h
 
 static int gdGuessBackgroundColorFromCorners(gdImagePtr im, int *color);
 static int gdColorMatch(gdImagePtr im, int col1, int col2, float threshold);
@@ -65,7 +66,6 @@ printf(rect-x: %i\nrect-y: %i\nrect-width: 
%i\nrect-height: %i\n, crop-x,
return NULL;
} else {
int y = crop-y;
-   unsigned int dst_y = 0;
if (src-trueColor) {
unsigned int dst_y = 0;
while (y  (crop-y + (crop-height - 1))) {
@@ -336,9 +336,10 @@ static int gdColorMatch(gdImagePtr im, int col1, int col2, 
float threshold)
const int

[PHP-CVS] com php-src: - disable threshold for now, will enable it again using CIEDE2000: UPGRADING ext/gd/gd.c ext/gd/php_gd.h

2013-03-04 Thread Pierre Joye
Commit:7698bc5735d188964cb98e6b6387c4cca26fcb0e
Author:Pierre Joye pierre@gmail.com Fri, 1 Mar 2013 08:10:49 
+0100
Parents:   22aeb976e0a42c82cec594e8ca7b38846758c9b7
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7698bc5735d188964cb98e6b6387c4cca26fcb0e

Log:
- disable threshold for now, will enable it again using CIEDE2000

Changed paths:
  M  UPGRADING
  M  ext/gd/gd.c
  M  ext/gd/php_gd.h


Diff:
diff --git a/UPGRADING b/UPGRADING
index bc642aa..5f7d3ee 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -176,6 +176,7 @@ PHP 5.5 UPGRADE NOTES
 
 - GD
   - imageflip
+  - imagecrop
 
 - Hash:
   - hash_pbkdf2()
@@ -308,6 +309,19 @@ PHP 5.5 UPGRADE NOTES
 - cURL:
   - Added CURLOPT_SAFE_UPLOAD to be used with curl_setopt().
 
+- GD
+  - Added constants for imageflip:
+. IMG_FLIP_HORIZONTAL
+   . IMG_FLIP_VERTICAL
+. IMG_FLIP_BOTH
+  - Added constants for imagecrop
+. IMG_CROP_DEFAULT
+. IMG_CROP_TRANSPARENT
+. IMG_CROP_BLACK
+. IMG_CROP_WHITE
+. IMG_CROP_SIDES
+. IMG_CROP_THRESHOLD
+
 
 10. Changes to INI File Handling
 
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index c004a72..7a2e214 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -891,6 +891,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageflip, 0)
ZEND_ARG_INFO(0, mode)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO(arginfo_imagecrop, 0)
+   ZEND_ARG_INFO(0, im)
+   ZEND_ARG_INFO(0, rect)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO(arginfo_imagecropauto, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, mode)
@@ -957,6 +962,7 @@ const zend_function_entry gd_functions[] = {
 #ifdef HAVE_GD_BUNDLED
PHP_FE(imageantialias,  
arginfo_imageantialias)
PHP_FE(imageflip,   
arginfo_imageflip)
+   PHP_FE(imagecrop,   
arginfo_imagecrop)
PHP_FE(imagecropauto,   
arginfo_imagecropauto)
 #endif
 
@@ -1218,7 +1224,10 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_CROP_BLACK, GD_CROP_BLACK, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_CROP_WHITE, GD_CROP_WHITE, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_CROP_SIDES, GD_CROP_SIDES, CONST_CS | 
CONST_PERSISTENT);
+#ifdef GD_ENABLE_CROP_THRESHOLD
REGISTER_LONG_CONSTANT(IMG_CROP_THRESHOLD, GD_CROP_THRESHOLD, 
CONST_CS | CONST_PERSISTENT);
+#endif
+
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif
@@ -5141,9 +5150,69 @@ PHP_FUNCTION(imageflip)
 }
 /* }}} */
 
+/* {{{ proto void imagecrop(resource im, array rect)
+   Crop an image using the given coordinates and size, x, y, width and height. 
*/
+PHP_FUNCTION(imagecrop)
+{
+   zval *IM;
+   long mode = -1;
+   long color = -1;
+   double threshold = 0.5f;
+   gdImagePtr im;
+   gdImagePtr im_crop;
+   HashTable rect_hash;
+   gdRect rect;
+   zval **tmp;
 
-/* {{{ proto void imageflip(resource im, int mode)
-   Flip an image (in place) horizontally, vertically or both directions. */
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|h, IM, 
rect_hash) == FAILURE)  {
+   return;
+   }
+
+   ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
+
+   if (zend_hash_find(rect_hash, x, strlen(x), (void **)tmp) != 
FAILURE) {
+   rect.x = Z_LVAL_PP(tmp);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing x 
position);
+   RETURN_FALSE;
+   }
+
+   if (zend_hash_find(rect_hash, y, strlen(x), (void **)tmp) != 
FAILURE) {
+   rect.y = Z_LVAL_PP(tmp);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing y 
position);
+   RETURN_FALSE;
+   }
+
+   if (zend_hash_find(rect_hash, width, strlen(x), (void **)tmp) != 
FAILURE) {
+   rect.width = Z_LVAL_PP(tmp);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing width);
+   RETURN_FALSE;
+   }
+
+   if (zend_hash_find(rect_hash, height, strlen(x), (void **)tmp) != 
FAILURE) {
+   rect.width = Z_LVAL_PP(tmp);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Missing height);
+   RETURN_FALSE;
+   }
+
+   im_crop = gdImageCrop(im, rect);
+
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown flip mode);
+   RETURN_FALSE;
+
+   if (im_crop == NULL) {
+   RETURN_FALSE;
+   } else {
+   ZEND_REGISTER_RESOURCE(return_value, im_crop, le_gd);
+   }
+}
+/* }}} */
+
+/* {{{ proto void imagecropauto(resource im [, int mode [, threshold [, 
color]]])
+   Crop an image

[PHP-CVS] com php-src: - clean and enable threshold: ext/gd/gd.c ext/gd/libgd/gd.h ext/gd/libgd/gd_crop.c

2013-03-04 Thread Pierre Joye
Commit:0c32a18d4c9995fe101484eef46e292a51543b68
Author:Pierre Joye pierre@gmail.com Thu, 28 Feb 2013 19:22:06 
+0100
Parents:   a991360344ed5bca7c20f74a10891d0fc52f0c9f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0c32a18d4c9995fe101484eef46e292a51543b68

Log:
- clean and enable threshold

Changed paths:
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd.h
  M  ext/gd/libgd/gd_crop.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 83733d1..c004a72 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -894,6 +894,8 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_INFO(arginfo_imagecropauto, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, mode)
+   ZEND_ARG_INFO(0, threshold)
+   ZEND_ARG_INFO(0, color)
 ZEND_END_ARG_INFO()
 #endif
 
@@ -1216,6 +1218,7 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_CROP_BLACK, GD_CROP_BLACK, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_CROP_WHITE, GD_CROP_WHITE, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_CROP_SIDES, GD_CROP_SIDES, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_CROP_THRESHOLD, GD_CROP_THRESHOLD, 
CONST_CS | CONST_PERSISTENT);
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif
@@ -5145,10 +5148,12 @@ PHP_FUNCTION(imagecropauto)
 {
zval *IM;
long mode = -1;
+   long color = -1;
+   double threshold = 0.5f;
gdImagePtr im;
gdImagePtr im_crop;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, IM, mode) 
== FAILURE)  {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|ldl, IM, 
mode, threshold, color) == FAILURE)  {
return;
}
 
@@ -5164,6 +5169,15 @@ PHP_FUNCTION(imagecropauto)
case GD_CROP_SIDES:
im_crop = gdImageCropAuto(im, mode);
break;
+
+   case GD_CROP_THRESHOLD:
+   if (color  0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Color argument missing with threshold mode);
+   RETURN_FALSE;
+   }
+   im_crop = gdImageCropThreshold(im, color, (float) 
threshold);
+   break;
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
flip mode);
RETURN_FALSE;
diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h
index adef026..8d9df2a 100644
--- a/ext/gd/libgd/gd.h
+++ b/ext/gd/libgd/gd.h
@@ -733,7 +733,8 @@ enum gdCropMode {
GD_CROP_TRANSPARENT,
GD_CROP_BLACK,
GD_CROP_WHITE,
-   GD_CROP_SIDES
+   GD_CROP_SIDES,
+   GD_CROP_THRESHOLD
 };
 
 gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop);
diff --git a/ext/gd/libgd/gd_crop.c b/ext/gd/libgd/gd_crop.c
index d5fd762..274e719 100644
--- a/ext/gd/libgd/gd_crop.c
+++ b/ext/gd/libgd/gd_crop.c
@@ -58,7 +58,7 @@ gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop)
if (src-sy  (crop-y + crop-height -1)) {
crop-height = src-sy - crop-y + 1;
}
-#ifdef 0
+#if 0
 printf(rect-x: %i\nrect-y: %i\nrect-width: %i\nrect-height: %i\n, 
crop-x, crop-y, crop-width, crop-height);
 #endif
if (dst == NULL) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add todo for threshold: ext/gd/libgd/gd_crop.c

2013-03-04 Thread Pierre Joye
Commit:22aeb976e0a42c82cec594e8ca7b38846758c9b7
Author:Pierre Joye pierre@gmail.com Thu, 28 Feb 2013 19:34:14 
+0100
Parents:   0c32a18d4c9995fe101484eef46e292a51543b68
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=22aeb976e0a42c82cec594e8ca7b38846758c9b7

Log:
- add todo for threshold

Changed paths:
  M  ext/gd/libgd/gd_crop.c


Diff:
diff --git a/ext/gd/libgd/gd_crop.c b/ext/gd/libgd/gd_crop.c
index 274e719..562098f 100644
--- a/ext/gd/libgd/gd_crop.c
+++ b/ext/gd/libgd/gd_crop.c
@@ -193,7 +193,7 @@ gdImagePtr gdImageCropAuto(gdImagePtr im, const unsigned 
int mode)
}
return gdImageCrop(im, crop);
 }
-
+/*TODOs: Implement DeltaE instead, way better perceptual differences */
 /**
  * Function: gdImageThresholdCrop
  *  Crop an image using a given color. The threshold argument defines


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add image crop support: ext/gd/config.m4 ext/gd/config.w32 ext/gd/gd.c ext/gd/gdcache.c ext/gd/libgd/gd.h ext/gd/libgd/gd_crop.c ext/gd/libgd/gd_png.c ext/gd/php_gd.h

2013-03-04 Thread Pierre Joye
Commit:a991360344ed5bca7c20f74a10891d0fc52f0c9f
Author:Pierre Joye pierre@gmail.com Thu, 28 Feb 2013 17:24:23 
+0100
Parents:   82765a07800fe39f662bb45fd18199d007e0dc23
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=a991360344ed5bca7c20f74a10891d0fc52f0c9f

Log:
- add image crop support

Changed paths:
  M  ext/gd/config.m4
  M  ext/gd/config.w32
  M  ext/gd/gd.c
  M  ext/gd/gdcache.c
  M  ext/gd/libgd/gd.h
  A  ext/gd/libgd/gd_crop.c
  M  ext/gd/libgd/gd_png.c
  M  ext/gd/php_gd.h

diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index 00e7c68..2f71705 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -297,7 +297,8 @@ if test $PHP_GD = yes; then
  libgd/gdfontmb.c libgd/gdfontl.c libgd/gdfontg.c 
libgd/gdtables.c libgd/gdft.c \
  libgd/gdcache.c libgd/gdkanji.c libgd/wbmp.c libgd/gd_wbmp.c 
libgd/gdhelpers.c \
  libgd/gd_topal.c libgd/gd_gif_in.c libgd/xbm.c 
libgd/gd_gif_out.c libgd/gd_security.c \
- libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_arc.c 
libgd/gd_rotate.c libgd/gd_color.c libgd/gd_transform.c
+ libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_arc.c 
libgd/gd_rotate.c libgd/gd_color.c \
+libgd/gd_transform.c libgd/gd_crop.c
 
 dnl check for fabsf and floorf which are available since C99
   AC_CHECK_FUNCS(fabsf floorf)
diff --git a/ext/gd/config.w32 b/ext/gd/config.w32
index ed3eab6..b25a0e2 100644
--- a/ext/gd/config.w32
+++ b/ext/gd/config.w32
@@ -47,7 +47,8 @@ if (PHP_GD != no) {
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c 
gdhelpers.c gd_io.c gd_io_dp.c \
gd_io_file.c gd_io_ss.c gd_jpeg.c gdkanji.c gd_png.c 
gd_ss.c \
gdtables.c gd_topal.c gd_wbmp.c gdxpm.c wbmp.c xbm.c 
gd_security.c gd_transform.c \
-   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c 
gd_color.c webpimg.c gd_webp.c, gd);
+   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c 
gd_color.c webpimg.c gd_webp.c \
+   gd_crop.c, gd);
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
ADD_FLAG(CFLAGS_GD,  \
 /D HAVE_GD_DYNAMIC_CTX_EX=1 \
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 2bd0a2d..83733d1 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -890,6 +890,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageflip, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, mode)
 ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_imagecropauto, 0)
+   ZEND_ARG_INFO(0, im)
+   ZEND_ARG_INFO(0, mode)
+ZEND_END_ARG_INFO()
 #endif
 
 /* }}} */
@@ -950,6 +955,7 @@ const zend_function_entry gd_functions[] = {
 #ifdef HAVE_GD_BUNDLED
PHP_FE(imageantialias,  
arginfo_imageantialias)
PHP_FE(imageflip,   
arginfo_imageflip)
+   PHP_FE(imagecropauto,   
arginfo_imagecropauto)
 #endif
 
 #if HAVE_GD_IMAGESETTILE
@@ -1204,6 +1210,12 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_FLIP_HORIZONTAL, GD_FLIP_HORINZONTAL, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_FLIP_VERTICAL, GD_FLIP_VERTICAL, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_FLIP_BOTH, GD_FLIP_BOTH, CONST_CS | 
CONST_PERSISTENT);
+   
+   REGISTER_LONG_CONSTANT(IMG_CROP_DEFAULT, GD_CROP_DEFAULT, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_CROP_TRANSPARENT, GD_CROP_TRANSPARENT, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_CROP_BLACK, GD_CROP_BLACK, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_CROP_WHITE, GD_CROP_WHITE, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_CROP_SIDES, GD_CROP_SIDES, CONST_CS | 
CONST_PERSISTENT);
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif
@@ -5125,6 +5137,44 @@ PHP_FUNCTION(imageflip)
RETURN_TRUE;
 }
 /* }}} */
+
+
+/* {{{ proto void imageflip(resource im, int mode)
+   Flip an image (in place) horizontally, vertically or both directions. */
+PHP_FUNCTION(imagecropauto)
+{
+   zval *IM;
+   long mode = -1;
+   gdImagePtr im;
+   gdImagePtr im_crop;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, IM, mode) 
== FAILURE)  {
+   return;
+   }
+
+   ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd);
+
+   switch (mode) {
+   case -1:
+   mode = GD_CROP_DEFAULT;
+   case GD_CROP_DEFAULT:
+   case GD_CROP_TRANSPARENT:
+   case GD_CROP_BLACK:
+   case GD_CROP_WHITE:
+   case GD_CROP_SIDES:
+   im_crop = gdImageCropAuto(im, mode);
+   break;
+   default

[PHP-CVS] com php-src: - damned conflicts: UPGRADING

2013-03-04 Thread Pierre Joye
Commit:33a8e387f58ba955e78e79c4b865dd989213443e
Author:Pierre Joye pierre@gmail.com Mon, 4 Mar 2013 12:11:20 
+0100
Parents:   a29ae8c8f76f6c96bad2cff1007bc037d0307dd3
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=33a8e387f58ba955e78e79c4b865dd989213443e

Log:
- damned conflicts

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index 89107ab..09218cc 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -68,28 +68,7 @@ PHP X.Y UPGRADE NOTES
 9. New Global Constants
 
 
- HEAD
-===
-- mysqli:
-  - Added MYSQLI_SERVER_PUBLIC_KEY constant to be used with mysqli_options()
 
-- cURL:
-  - Added CURLOPT_SAFE_UPLOAD to be used with curl_setopt().
-
-- GD
-  - Added constants for imageflip:
-. IMG_FLIP_HORIZONTAL
-   . IMG_FLIP_VERTICAL
-. IMG_FLIP_BOTH
-  - Added constants for imagecrop
-. IMG_CROP_DEFAULT
-. IMG_CROP_TRANSPARENT
-. IMG_CROP_BLACK
-. IMG_CROP_WHITE
-. IMG_CROP_SIDES
-. IMG_CROP_THRESHOLD
-
- PHP-5.5
 
 10. Changes to INI File Handling
 


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix path: ext/gd/tests/imagecrop_auto.phpt

2013-03-04 Thread Pierre Joye
Commit:0404c38615b54f6ea58ebd16f104da03f1202324
Author:Pierre Joye pierre@gmail.com Mon, 4 Mar 2013 14:14:09 
+0100
Parents:   e9a2642c8913736be422938b555fd37d2f6ce5ef
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0404c38615b54f6ea58ebd16f104da03f1202324

Log:
- fix path

Changed paths:
  M  ext/gd/tests/imagecrop_auto.phpt


Diff:
diff --git a/ext/gd/tests/imagecrop_auto.phpt b/ext/gd/tests/imagecrop_auto.phpt
index 1860e39..c2b5177 100644
--- a/ext/gd/tests/imagecrop_auto.phpt
+++ b/ext/gd/tests/imagecrop_auto.phpt
@@ -52,7 +52,7 @@ var_dump(imagesx($im_crop));
 var_dump(imagesy($im_crop));
 
 echo IMG_CROP_THRESHOLD\n;
-$im = imagecreatefrompng(logo_noise.png);
+$im = imagecreatefrompng(__DIR__ . /logo_noise.png);
 $im_crop = imagecropauto($im, IMG_CROP_THRESHOLD, 0.1, 0x0);
 imagepng($im_crop, __DIR__ . /crop_threshold.png);
 var_dump(imagesx($im_crop));
@@ -79,4 +79,4 @@ int(11)
 int(11)
 IMG_CROP_THRESHOLD
 int(240)
-int(134)
\ No newline at end of file
+int(134)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix name for imageflip constants, consistent witht the other: ext/gd/gd.c

2013-02-27 Thread Pierre Joye
Commit:74983a45cc3be6f9697843d9dfb7913021c2519b
Author:Pierre Joye pierre@gmail.com Wed, 27 Feb 2013 20:23:31 
+0100
Parents:   03d0bf633d26644f6105e1f75f86dd352e80ce0f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=74983a45cc3be6f9697843d9dfb7913021c2519b

Log:
- fix name for imageflip constants, consistent witht the other

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 05ab6551..c6400f5 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1200,9 +1200,10 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_EFFECT_NORMAL, gdEffectNormal, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_EFFECT_OVERLAY, gdEffectOverlay, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(GD_BUNDLED, 1, CONST_CS | CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(GD_FLIP_HORINZONTAL, GD_FLIP_HORINZONTAL, 
CONST_CS | CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(GD_FLIP_VERTICAL, GD_FLIP_VERTICAL, CONST_CS | 
CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(GD_FLIP_BOTH, GD_FLIP_BOTH, CONST_CS | 
CONST_PERSISTENT);
+
+   REGISTER_LONG_CONSTANT(IMG_FLIP_HORINZONTAL, GD_FLIP_HORINZONTAL, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_FLIP_VERTICAL, GD_FLIP_VERTICAL, CONST_CS 
| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(IMG_FLIP_BOTH, GD_FLIP_BOTH, CONST_CS | 
CONST_PERSISTENT);
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add test: ext/gd/tests/imageflip.phpt

2013-02-27 Thread Pierre Joye
Commit:03d0bf633d26644f6105e1f75f86dd352e80ce0f
Author:Pierre Joye pierre@gmail.com Wed, 27 Feb 2013 20:22:45 
+0100
Parents:   34adce6c47f817fb13df5be56cd0d29e42389e69
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=03d0bf633d26644f6105e1f75f86dd352e80ce0f

Log:
- add test

Changed paths:
  A  ext/gd/tests/imageflip.phpt


Diff:
diff --git a/ext/gd/tests/imageflip.phpt b/ext/gd/tests/imageflip.phpt
new file mode 100644
index 000..a1922c2
--- /dev/null
+++ b/ext/gd/tests/imageflip.phpt
@@ -0,0 +1,31 @@
+--TEST-- 
+Testing imageflip() of GD library 
+--SKIPIF-- 
+?php  
+if ( ! extension_loaded('gd') || !function_exists('imageflip')) die( 'skip GD 
not present; skipping test' ); 
+? 
+--FILE--
+?php
+
+$im = imagecreatetruecolor( 99, 99 ); 
+
+imagesetpixel($im, 0, 0, 0xFF);
+imagesetpixel($im, 0, 98, 0x00FF00);
+imagesetpixel($im, 98, 0, 0xFF);
+imagesetpixel($im, 98, 98, 0xFF);
+
+imageflip($im, IMG_FLIP_HORINZONTAL);
+imageflip($im, IMG_FLIP_VERTICAL);
+imageflip($im, IMG_FLIP_BOTH);
+
+
+var_dump(dechex(imagecolorat($im, 0, 0)));
+var_dump(dechex(imagecolorat($im, 0, 98)));
+var_dump(dechex(imagecolorat($im, 98, 0)));
+var_dump(dechex(imagecolorat($im, 98, 98)));
+? 
+--EXPECT-- 
+string(2) ff
+string(4) ff00
+string(6) ff
+string(2) ff
\ No newline at end of file


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add constants for imageflip: ext/gd/gd.c

2013-02-27 Thread Pierre Joye
Commit:34adce6c47f817fb13df5be56cd0d29e42389e69
Author:Pierre Joye pierre@gmail.com Wed, 27 Feb 2013 20:08:26 
+0100
Parents:   efffdb4d7f7f9ace99bcd935c528c60c57c577a6
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=34adce6c47f817fb13df5be56cd0d29e42389e69

Log:
- add constants for imageflip

Changed paths:
  M  ext/gd/gd.c


Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 0c6053b..05ab6551 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1200,6 +1200,9 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT(IMG_EFFECT_NORMAL, gdEffectNormal, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(IMG_EFFECT_OVERLAY, gdEffectOverlay, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(GD_BUNDLED, 1, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(GD_FLIP_HORINZONTAL, GD_FLIP_HORINZONTAL, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(GD_FLIP_VERTICAL, GD_FLIP_VERTICAL, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(GD_FLIP_BOTH, GD_FLIP_BOTH, CONST_CS | 
CONST_PERSISTENT);
 #else
REGISTER_LONG_CONSTANT(GD_BUNDLED, 0, CONST_CS | CONST_PERSISTENT);
 #endif


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - add only once: ext/gd/config.w32

2013-02-27 Thread Pierre Joye
Commit:efffdb4d7f7f9ace99bcd935c528c60c57c577a6
Author:Pierre Joye pierre@gmail.com Wed, 27 Feb 2013 16:03:17 
+0100
Parents:   98e43de7c59420240dc8ff12c9c1d80730ccb87a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=efffdb4d7f7f9ace99bcd935c528c60c57c577a6

Log:
- add only once

Changed paths:
  M  ext/gd/config.w32


Diff:
diff --git a/ext/gd/config.w32 b/ext/gd/config.w32
index 901de82..ed3eab6 100644
--- a/ext/gd/config.w32
+++ b/ext/gd/config.w32
@@ -47,7 +47,7 @@ if (PHP_GD != no) {
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c 
gdhelpers.c gd_io.c gd_io_dp.c \
gd_io_file.c gd_io_ss.c gd_jpeg.c gdkanji.c gd_png.c 
gd_ss.c \
gdtables.c gd_topal.c gd_wbmp.c gdxpm.c wbmp.c xbm.c 
gd_security.c gd_transform.c \
-   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c 
gd_color.c webpimg.c gd_webp.c gd_transform.c, gd);
+   gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c 
gd_color.c webpimg.c gd_webp.c, gd);
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
ADD_FLAG(CFLAGS_GD,  \
 /D HAVE_GD_DYNAMIC_CTX_EX=1 \


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/gd/config.w32

2013-02-27 Thread Pierre Joye
Commit:6192dbaa7e4b79cd8bbd9b88167a7058bd8fcfa1
Author:Pierre Joye pierre@gmail.com Wed, 27 Feb 2013 16:03:27 
+0100
Parents:   6ab9f906da13ac84bf3a62aeb65f099ed28eb946 
efffdb4d7f7f9ace99bcd935c528c60c57c577a6
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=6192dbaa7e4b79cd8bbd9b88167a7058bd8fcfa1

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  - add only once
  - add new file for m4 as well

Changed paths:
  MM  ext/gd/config.w32


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: - fix conflict on merge: ext/gd/config.w32

2013-02-27 Thread Pierre Joye
Commit:6ab9f906da13ac84bf3a62aeb65f099ed28eb946
Author:Pierre Joye pierre@gmail.com Wed, 27 Feb 2013 16:00:11 
+0100
Parents:   c4ef791958a45c1a2623369b5daf143014812ed5 
fa940a60dec4ac1609b2696607783cf5b68e4b07
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=6ab9f906da13ac84bf3a62aeb65f099ed28eb946

Log:
- fix conflict on merge

Changed paths:
  MM  ext/gd/config.w32


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   8   9   10   >