I've tried your script but it doesn't work.
I know the script should normally work, but it doesn't.

I think I have a problem with my Apache 2.0.4 server.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message ----- 
From: "zentara" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 12, 2002 3:35 PM
Subject: Re: printing an image


On Thu, 12 Dec 2002 10:15:19 +0200, [EMAIL PROTECTED] (Octavian Rasnita)
wrote:

>Hi all,
>
>Can someone give me a correct example  of code that prints an image?

Here's an example that is as simple as it can get: :-)
##################################################
#!/usr/bin/perl
$file='image1.png';
print<<EOH; 
Content-Type: image/png

EOH
binmode STDOUT;
open (FH, "$file") or die "Can't open $file: $!";
while(<FH>){print}
close (FH);
exit 0;
#################################################

#you might want to use this

$/ = \8192; # read data in 8kbyte chunks rather than from LF to LF
            # see perldoc perlvar
print while <IMAGE>;
    


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




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

Reply via email to