CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Image output in Perl

 



jkepler
Novice

Nov 7, 2015, 5:44 AM

Post #1 of 2 (944 views)
Image output in Perl Can't Post

Hi,

Does anyone knows a simple way opf displaying a image in a html output from a perl script?

It's easy to output (print) a image tag with a full path (for instance http://domain.com/images/image1.jpg).

But how to integrate the output pulling the image from a directory along with html code, or even javascript?

My doubt comes from the headers; if it's "text/html" it won't work with the "image" header...

Never had this doubt...But I've never worked with images output either...

Regards


Zhris
Enthusiast

Nov 23, 2015, 11:44 AM

Post #2 of 2 (884 views)
Re: [jkepler] Image output in Perl [In reply to] Can't Post

Hi,

Your URL doesn't have to point at an image file directly, it can also point at a script that generates the appropriate content type then reads and prints the image data ( http://domain.com/image.pl?id=777 ). This technique is useful when your images are not already standalone files and you cannot practically convert them, when generating unique / dynamic images, or your image directory is not publicly available.

Chris


(This post was edited by Zhris on Nov 23, 2015, 11:45 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives