Bug #70622 [NEW]: imagealphablending() reports bad first parameter
From: gb4ker at gmail dot com
Operating system: Linux (1and1)
PHP version: 5.5.30
Package: GD related
Bug Type: Bug
Bug description:imagealphablending() reports bad first parameter
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.
--
Edit bug report at https://bugs.php.net/bug.php?id=70622&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70622&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70622&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70622&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70622&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70622&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70622&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70622&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70622&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70622&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70622&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70622&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70622&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70622&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70622&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70622&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70622&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70622&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70622&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70622&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70622&r=mysqlcfg
Thread (3 messages)
- gb4ker at gmail dot com