php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70622 imagealphablending() reports bad first parameter
Submitted: 2015-10-02 13:48 UTC Modified: 2016-07-31 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: gb4ker at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: GD related
PHP Version: 5.5.30 OS: Linux (1and1)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gb4ker at gmail dot com
New email:
PHP Version: OS:

 

 [2015-10-02 13:48 UTC] gb4ker at gmail dot com
Description:
------------
The below code is fine on PHP 5.4 but fails on PHP 5.5 (tested on 1and1 Linux servers and WAMP)

imagealphablending() reports a problem - boolean parameter for parameter 1 instead of resource - on PHP 5.5 but NOT on PHP 5.4

Test script:
---------------
<?php

$f = "test.png";

$img = imagecreatefrompng($f);
if (!$img)
{
	echo "Failed to open ".$f;
	exit;
}

imagealphablending($img, true);
imagesavealpha($img, true);
      
header("Content-Type: image/png");
imagepng($img,null,6);
imagedestroy($img);
exit;

?>
 


Expected result:
----------------
Script runs on php 5.4 and returns an image.
On 5.5 reports broken image depending on browser.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-23 18:30 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-07-23 18:30 UTC] cmb@php.net
I can't reproduce this issue. If you can, please check the result
of imagecreatefrompng() explicitly, e.g. by

  var_dump($img = imagecreatefrompng($f));
 [2016-07-31 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 04:01:31 2024 UTC