Bug #54686 [Opn->Bgs]: Displays error when I want to display a PNG with imagepng($file)
| From: | pajoye@php.net | Date: | Sat, 07 May 2011 13:22:24 +0000 |
| Subject: | Bug #54686 [Opn->Bgs]: Displays error when I want to display a PNG with imagepng($file) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160593@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54686&edit=1
ID: 54686
Updated by: pajoye@php.net
Reported by: juanjp at live dot com
Summary: Displays error when I want to display a PNG with
imagepng($file)
-Status: Open
+Status: Bogus
Type: Bug
Package: *Graphics related
Operating System: Windows XP Home Edition SP3
PHP Version: 5.2.17
Block user comment: N
Private report: N
New Comment:
Show the source, you certainly left a white space after ?>, delete the
ending tag
and it should work.
Previous Comments:
------------------------------------------------------------------------
[2011-05-07 15:12:52] juanjp at live dot com
Description:
------------
---
From manual page: http://www.php.net/function.imagepng
---
The bug occurs with imagepng(). It just displays an error. The code was
completely copied from:
http://php.net/manual/en/function.imagecreate.php
Test script:
---------------
<?php
header("Content-Type: image/png");
$im = @imagecreate(110, 20)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
Expected result:
----------------
An image is supposed to appear (the file path is correct).
Actual result:
--------------
Displays: The image âhttp://localhost:8080/myphpfile.phpâ
cannot be
displayed because it contains errors.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54686&edit=1