Edit report at http://bugs.php.net/bug.php?id=54686&edit=1

 ID:                 54686
 Updated by:         [email protected]
 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

Reply via email to