From:             
Operating system: Windows XP Home Edition SP3
PHP version:      5.2.17
Package:          *Graphics related
Bug Type:         Bug
Bug description:Displays error when I want to display a PNG with imagepng($file)

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 bug report at http://bugs.php.net/bug.php?id=54686&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54686&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54686&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54686&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54686&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54686&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54686&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54686&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54686&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54686&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54686&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54686&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54686&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54686&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54686&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54686&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54686&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54686&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54686&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54686&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54686&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54686&r=mysqlcfg

Reply via email to