com php-src: ensure that the defined interpolation method is used by the generic scaling functions: ext/gd/libgd/gd_interpolation.c
| From: | Anatol Belski | Date: | Wed, 16 Oct 2013 08:29:06 +0000 |
| Subject: | com php-src: ensure that the defined interpolation method is used by the generic scaling functions: ext/gd/libgd/gd_interpolation.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73531@lists.php.net to get a copy of this message | ||
Commit: f074ad207c8addb2e8e955c1003b90a7a3bba75c
Author: unknown <pajoye@php.net> Mon, 9 Sep 2013 11:56:05 +0200
Committer: Anatol Belski <ab@php.net> Wed, 16 Oct 2013 01:29:06 -0700
Parents: 4d86b8b5075c1c86f3f8e3017edab7983abf519a
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f074ad207c8addb2e8e955c1003b90a7a3bba75c
Log:
ensure that the defined interpolation method is used by the generic scaling functions
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 b6e7c69..e34242b 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);