-----Original Message-----
From: Todd Morrison [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 15, 2005 3:18 PM
To: [email protected]
Subject: image file data arrays/HTML -- any sagely advice?
Hey Everyone,
I am writing a .pl that will grab an image and store it in an array, i.e.
open (GIFFILE, $filename)
binmode (GIFFILE);
@fileData = <GIFFILE>;
close (GIFFILE)
Is there a way to "print" the array to an HTML document (i.e. display the
image), at any trivial point in the HTML document's body? Any
advice/pointers would be super-appreciated.
Thanks!
Todd
---------- snip -----------------
HTML doesn't actually contain images, as opposed to something like a MS Word
document. If you go to a web page with 10 images, you actually do 11
requests (1 for the page text itself and one for each image). If you save
an HTML document to disk via IE or Word, you will see a text file and a
folder containing all of the images, stylesheets, javascript files, etc. So
there is no way to do it truly in line.
You can, however, create a cgi application that gets a request and servers
an image, rather than having a link directly to a file location. For
example, you might see something like:
http://www.somesite.com/cgi-bin/getImage.cgi?filename=image.gif
inline in an HTML document. But, again, it is not imbedded in the HTML
document. The only exception that I know of is HTML mail, but that is
another story.
Does this answer the question / render it moot, or have I completely
misunderstood the question?
Chris Snyder
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs