Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
... use CGI qw(header path_info); my $file = getNoImage($SHOP); print header(-Content_type => 'image/gif', -Content_length => length $ +file), $file; ... sub getNoImage { my $SHOP = shift || croak ("ProcessAction : Missing Shop data"); my ($chunk, $image); open IMAGEFILE, "$SHOP->{-TEMPLATE_PATH}/img/MyFile.gif" or die "Can +not open file: $!\n"; binmode IMAGEFILE; while ( read(IMAGEFILE, $chunk, 1024) ) { $image .= $chunk; } close IMAGEFILE; return $image; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Image not displayed properly
by tedrek (Pilgrim) on Aug 18, 2003 at 21:25 UTC | |
by Anonymous Monk on Aug 18, 2003 at 21:34 UTC | |
by LameNerd (Hermit) on Aug 18, 2003 at 21:36 UTC | |
Re: Image not displayed properly
by sauoq (Abbot) on Aug 18, 2003 at 21:26 UTC | |
Re: Image not displayed properly
by bean (Monk) on Aug 18, 2003 at 23:36 UTC | |
by Anonymous Monk on Aug 19, 2003 at 02:27 UTC | |
by PodMaster (Abbot) on Aug 19, 2003 at 09:55 UTC | |
Re: Image not displayed properly
by esh (Pilgrim) on Aug 19, 2003 at 02:35 UTC |