Re: imagefrompng() question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux