summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorunknown <pajoye@php.net>2013-09-09 11:56:58 +0200
committerunknown <pajoye@php.net>2013-09-09 11:56:58 +0200
commitd32194172ad6dba22378609324b6d3ae2bcff41c (patch)
treeb59707027f30621a777bc49c6c0681718677bb87 /ext/gd
parentdf711f2c56c74609ec5865fab5fee247b175c654 (diff)
parentb54b6e30a4e46d9dd1f1bf0cbc0d4539c0f7d51d (diff)
downloadphp-git-d32194172ad6dba22378609324b6d3ae2bcff41c.tar.gz
Merge branch 'PHP-5.5'
* PHP-5.5: ensure that the defined interpolation method is used by the generic scaling functions
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/libgd/gd_interpolation.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index b6e7c69201..e34242bb73 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1063,6 +1063,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);
@@ -1070,6 +1071,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);
@@ -1084,8 +1086,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);