in reply to Embedded Hex Image problem

Hmm... I don't know if this is the problem, but try using binmode() on STDOUT before you print the image. (I do notice that there is a 0a byte in your GIF.)

Replies are listed 'Best First'.
Re: Re: Embedded Hex Image problem
by BigJoe (Curate) on Dec 13, 2000 at 18:06 UTC
    Thanks Chipmunk it work.
    use DBI; use strict; my $dbh = DBI->connect("DBI:Oracle:host=xxx.xxx.xxx.xxx;sid=xxxxx", 'x +xxxx', 'xxxxx') or die "Connecting : $DBI::errstr\n"; $dbh->{LongReadLen} = 512 * 1024; my $sth = $dbh->prepare("Select TITLE, HEX_PIC from pics"); $sth->execute(); (my $name, my $image) = $sth->fetchrow_array; undef $/; print "Content-type: image/gif\n\n"; binmode(STDOUT); my $ImageGIF = pack("H*", $image); print $ImageGIF; $sth->finish; $dbh->disconnect;


    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.