]> granicus.if.org Git - php/commitdiff
ensure that the defined interpolation method is used by the generic scaling functions
authorunknown <pajoye@php.net>
Mon, 9 Sep 2013 09:56:05 +0000 (11:56 +0200)
committerunknown <pajoye@php.net>
Mon, 9 Sep 2013 09:56:05 +0000 (11:56 +0200)
NEWS
ext/gd/libgd/gd_interpolation.c

diff --git a/NEWS b/NEWS
index 817f9f74db69081f1f2e45e657244da62ccece67..865557198e5715a80b2c121aca9bc00269011891 100644 (file)
--- 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)
index e3247a78c1bf7517a8dc471b4248f6764fcba15a..3643535f2eed3364c385505aa513b90cf44fda7a 100644 (file)
@@ -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);