Bug #73274 [Asn]: imagescale() with IMG_WEIGHTED4 always returns FALSE
| From: | cmb@php.net | Date: | Sun, 09 Oct 2016 16:32:13 +0000 |
| Subject: | Bug #73274 [Asn]: imagescale() with IMG_WEIGHTED4 always returns FALSE | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204569@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73274&edit=1
ID: 73274
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: imagescale() with IMG_WEIGHTED4 always returns FALSE
Status: Assigned
Type: Bug
Package: GD related
Operating System: *
PHP Version: master-Git-2016-10-09 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Actually, IMG_WEIGHTED4 is not yet supported by imagescale(),
but by the other interpolation functions.
So this appears to be rather a documentation issue.
Previous Comments:
------------------------------------------------------------------------
[2016-10-09 14:35:11] cmb@php.net
Description:
------------
When imagescale() is called with the $mode set to IMG_WEIGHTED4,
the operation always fails.
This has been reported against upstream libgd[1], but as PHP's
bundled libgd is affected as well, I'm forwarding the issue.
[1] <https://github.com/libgd/libgd/issues/328>
Test script:
---------------
<?php
$src = imagecreatetruecolor(100, 100);
imagefilledrectangle($src, 0,0, 99,99, 0xFFFFFF);
$dst = imagescale($src, 200, 200, IMG_WEIGHTED4);
var_dump($dst != NULL);
Expected result:
----------------
bool(true)
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73274&edit=1