From: dhaliwaljee at gmail dot com
Operating system: all
PHP version: 5.3.23
Package: GD related
Bug Type: Bug
Bug description:test on php version = 5.3.13 and 5.3.5
Description:
I have problem with imagepng;
"imagepng()" This code shows broken image on browser, but its working fine
to save
the image on local disk. for example: imagepng($image,"a.png"); is working
but I
don't want to save this file.
Test script:
---
$image = imagecreatetruecolor(200, 400) or die("a");
$bg = imagecolorallocate($image, 255, 255, 255) or die("d");
imagestring($image, 12, 10, 100, "Hello", $bg) or die("b");
header('Content-type: image/png');
imagepng($image) or die("c");
Expected result:
"Hello" Image on Browser
Actual result:
--
Broken Image on Chrome
and
Firefox output:
The image "http://localhost/Test/index.php"; cannot be displayed because it
contains errors.
--
Edit bug report at https://bugs.php.net/bug.php?id=64499&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=64499&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=64499&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=64499&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64499&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64499&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64499&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64499&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64499&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=64499&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64499&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=64499&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=64499&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64499&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64499&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64499&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64499&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=64499&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64499&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64499&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64499&r=mysqlcfg