Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > JPEG and Perl

Reply
Thread Tools

JPEG and Perl

 
 
CSUIDL PROGRAMMEr
Guest
Posts: n/a
 
      08-30-2005
Folks
I am new to perl
ALl want to do is to display a image on my html page using perl .
Here is my code

#!/usr/bin/perl
print "Content-type:image/jpeg\n\n";
print " </html>";
print "<body>";
print " <IMG SRC='emb.jpeg'> " ;
print "</body>";
print"</html>";
Is it right or am i missing something
Thanks

 
Reply With Quote
 
 
 
 
James Taylor
Guest
Posts: n/a
 
      08-30-2005
In article < .com>,
CSUIDL PROGRAMMEr <> wrote:
>
> All I want to do is to display a image on my html page using perl.


Sorry, it is not clear why you need to use Perl to display an
image. Your code below has several problems, and I cannot guess
from reading it what you really want to do.

> Here is my code
>
> #!/usr/bin/perl


You should always use strict and warnings.

> print "Content-type:image/jpeg\n\n";


This looks like a CGI script that is about to supply JPEG data but
it then supplies HTML instead.

> print " </html>";


That end tag is out of place.

> print "<body>";


There is no doctype or head?

> print " <IMG SRC='emb.jpeg'> " ;
> print "</body>";
> print"</html>";
> Is it right or am i missing something


I don't think Perl is your problem. You need to understand more
about how CGI and HTML works. I suggest you ask in a group that
covers CGI (not this one). Try comp.infosystems.www.authoring.cgi.

--
James Taylor, London, UK PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
jpeg and jpeg 2000 Conrad Digital Photography 72 02-03-2007 11:04 PM
Better JPEG program - minimized JPEG degredation Paul D. Sullivan Digital Photography 14 01-30-2007 07:34 PM
Nikon D70 RAW converted to JPEG - jpeg file size 3MB ? 5 MB? Amit Digital Photography 3 03-17-2006 10:40 AM
Exiff-jpeg and jpeg certsnsearches Digital Photography 2 01-07-2004 08:13 PM
huge jpeg files show as very small thumbnails (canon 300d, JPEG) kl Digital Photography 6 11-12-2003 08:11 PM



Advertisments