ID:               25716
 Updated by:       [EMAIL PROTECTED]
 Reported By:      indi2000 at pisem dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Linux
 PHP Version:      4.3.3
 New Comment:

Works fine here. Did you forget to call the function? Does your code
print something (e.g. whitespace) before you call the function? Does it
have whitespace before the "<?php", perhaps in an include file?

If you want to reopen this bug, please provide a short, but _complete_
example script.


Previous Comments:
------------------------------------------------------------------------

[2003-10-01 12:19:07] indi2000 at pisem dot net

Description:
------------
Imagepng() works in sample.php but doesn't work if same code is called
inside function.

See reproduced code..

No errors, but it shows the broken image (like broken link to image or
image doesn't exists)


Reproduce code:
---------------
sample.php
---
header('Content-type: image/png');
$this->image = "images/1.png";
$this->im=imagecreatefrompng($this->image);
$this->w=imagecolorallocate($this->im, 0, 0, 0);
imagepng($this->im);
imagedestroy($this->im);  
---

function show_image() {
        header('Content-type: image/png');
        $this->image = "images/1.png";
        $this->im=imagecreatefrompng($this->image);
        $this->w=imagecolorallocate($this->im, 0, 0, 0);
        imagepng($this->im);
        imagedestroy($this->im);  
}




------------------------------------------------------------------------


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

Reply via email to