At 08:44 AM 9/13/2001 -0300, Wagner wrote:
>Hello,
>
>I'm editing a script that produces a .png image, i want it to turn it into a
>.html doc.
>
>My first doubt is that i can't put the image in the html doc. The image is
>stored in $im and i don't know how to put it in the doc.
>
>ex:
>print "Content-type text/html\n\n";
>print "<HTML><img src=$im></HTML>;

Not unless $im is a URL and even then you may want to consider quoting it. 
You can't just dump binary data inside an HTML document. So $im must be a 
URL not the binary data of an image.

>I'm also trying to put this image in a file this way:
>
>$file = 'c:\image.png';
>open (INFO, ">$file");
>print INFO "$im->png";
>close (INFO);
>
>But it doesn't work...

It's possible that you want to turn binmode on INFO...

binmode(INFO) before printing a binary image to it.

>The second doubt is how can i put the content of a variable in the doc. For
>example, if i have a valiable:
>
>$file = 'c:\dir\asdf.asd',
>
>Then i try to put in the doc this way:
>
>print "<HTML><FONT>$file</FONT></HTML>";
>
>But when i run it apears $file in the .html doc and i wanted to see
>c:\dir\asdf.asd....

$file should interpolate fine if you truly did use double-quotes in your 
print statement, but I think it is possible that you should cut and paste 
exactly what you used because you seem a bit confused, and I am afraid that 
it's possible that you're information is not relayed exactly as you say you 
typed your tests out.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to