Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: CGI: Raw image data

by Sprad (Hermit)
on Apr 28, 2005 at 23:24 UTC ( [id://452491]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI: Raw image data
in thread CGI: Raw image data

Can I do that in the middle of a page, though? I actually need to display several of these images on a page, along with some UI and text.

---
A fair fight is a sign of poor planning.

Replies are listed 'Best First'.
Re^3: CGI: Raw image data
by merlyn (Sage) on Apr 29, 2005 at 01:01 UTC
Re^3: CGI: Raw image data
by eric256 (Parson) on Apr 28, 2005 at 23:28 UTC

    For each image you can make the images URL refer to a CGI like the one he gave you so that each image is a call to the CGI.


    ___________
    Eric Hodges
      Just to clarify a little bit:
      <img src="PATH_TO_CGI.cgi?whatever_params_youneed">

        I'd actually suggest using PATH_INFO to pass around the parameters, as it makes it more likely that browsers will cache it, and not attempt to resubmit, because they see a QUERY_STRING, and shut off caching. (You can also send cache-control headers).

        And don't forget your ALT attribute:

        printf( '<img src="%s/%s" alt="%s" width="%i" height="%i" />', $cgi_url, @image{qw(id description width height)} );
Re^3: CGI: Raw image data
by dorward (Curate) on Apr 29, 2005 at 09:19 UTC

    You could use the data: url scheme, but you'll find browser support a little lacking (Internet Explorer is among those browsers without support).

    You'll need to, as previously mentioned, have the user agent make additional requests for each image.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://452491]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2025-05-22 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.