Re: imagefrompng() question
| From: | Richard Lynch | Date: | Mon, 15 May 2006 22:40:54 +0000 |
| Subject: | Re: imagefrompng() question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236229@lists.php.net to get a copy of this message | ||
On Mon, May 15, 2006 9:16 am, D A GERM wrote:
> I'm having difficulty displaying text after imagefrompng(). I'm using
> PEARS's Image_Barcode to displa a barcode and trying to wrap
> imagefrompng() around it. I am able to display the barcode properly
> but
> not the rest of my document (a mix a text and other images).
>
> Is there a proper heading I should use? I been looking over the docs
> for imagefrompng() and PEAR's Image_Barcode but have not found
> anything
> useful to offer a solution to my problem. Any suggestions?
You cannot slam both the image and your HTML into a single URL /
document.
You need more like:
somepage.php
<html><body><img src="image.php" />This is text
output.</body></html>
image.php
<?php
$image = imagecreatetruecolor(400, 300);
header("Content-type: image/png");
imagepng($image);
?>
So you need SEPARATE URLs and files for the HTML and the PNG --
exactly the same as you would with static HTML and PNGs.
Or any image format, not just PNG.
--
Like Music?
http://l-i-e.com/artists.htm