php.net |  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: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: GD related
PHP Version: master-Git-2016-10-09 (Git) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-09 14:35 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2016-10-09 14:35 UTC] cmb@php.net
-Summary: imagescale() with IMG_WEIGHTED4 always returns NULL +Summary: imagescale() with IMG_WEIGHTED4 always returns FALSE
 [2016-10-09 16:32 UTC] cmb@php.net
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] cmb@php.net
-Type: Bug +Type: Documentation Problem
 [2016-10-09 16:50 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=340412
Log: Fix #73274: imagescale() with IMG_WEIGHTED4 always returns FALSE
 [2016-10-09 16:50 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=edf411e2cd51cfbfaf79389b051e3ec74e68f706
Log: Fix #73274: imagescale() with IMG_WEIGHTED4 always returns FALSE
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 17:01:27 2024 UTC