|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73274 imagescale() with IMG_WEIGHTED4 always returns FALSE
Submitted: 2016-10-09 14:35 UTC Modified: 2016-10-09 16:50 UTC
From: Assigned: cmb (profile)
Status: Closed Package: GD related
PHP Version: master-Git-2016-10-09 (Git) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
50 - 42 = ?
Subscribe to this entry?

 [2016-10-09 14:35 UTC]
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] <>

Test script:

$src = imagecreatetruecolor(100, 100);
imagefilledrectangle($src, 0,0, 99,99, 0xFFFFFF);
$dst = imagescale($src, 200, 200, IMG_WEIGHTED4);
var_dump($dst != NULL);

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-09 14:35 UTC]
-Assigned To: +Assigned To: cmb
 [2016-10-09 14:35 UTC]
-Summary: imagescale() with IMG_WEIGHTED4 always returns NULL +Summary: imagescale() with IMG_WEIGHTED4 always returns FALSE
 [2016-10-09 16:32 UTC]
Actually, IMG_WEIGHTED4 is not yet supported by imagescale(),
but by the other interpolation functions.

So this appears to be rather a documentation issue.
 [2016-10-09 16:49 UTC]
-Type: Bug +Type: Documentation Problem
 [2016-10-09 16:50 UTC]
Automatic comment from SVN on behalf of cmb
Log: Fix #73274: imagescale() with IMG_WEIGHTED4 always returns FALSE
 [2016-10-09 16:50 UTC]
-Status: Assigned +Status: Closed
 [2020-02-07 06:06 UTC]
Automatic comment on behalf of cmb
Log: Fix #73274: imagescale() with IMG_WEIGHTED4 always returns FALSE
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 13:01:24 2023 UTC