First, thanks (again) for past help. This one might be tough.
I have a number of images stored in a database and a script that takes care
of fetching the right one. It is the target of an html image tag.
<img src="http://localhost:80/fetch.pl?star=polatis&type=bright&num=5";>
In static pages, this works fine. In CGI pages this works fine also.
BUT, I want to animate the images. In javascript if I manually assemble the
list of images to animate (ie many lines of the sort
<script language="javascript">
 var img0 = new Image();
 img0.src = "http://localhost:80/fetch.pl?num=12&star=polaris&type=brite";;
 var img1 = new Image();
 img1.src = "http://localhost:80/fetch.pl?num=13&star=polaris&type=brite";;
etc.
The html page displays correctly if I double click it.
If however, I use perl and CGI to produce the page with animation, I suffer
a core dump.
The same page will animate correctly if the image sources are filesystem
files (and this is what I am trying to get away from)
Any ideas?
TIA
David

#!C:/perl.bin/perl -w
# this is fetch.pl
use strict;
# connection, parameter details omitted for brevity
# again, this script seems to work fine
use CGI qw(:standard escapeHTML);
my $q = new CGI;
use DBI;
use Image::Magick;
my $sth1 = $dbh->prepare("select image from nasa_hub where star = '$star'
and type = '$type' and num = '$num'") or die"Prepare Fails: ", DBI::errstr,
"\n";
my $re = $sth1->execute or print"Error ".DBI::errstr."\n";
my $r = 0;
($blob) = $sth1->fetchrow_array;
$sth1->finish;
$dbh->disconnect();
my $image = Image::Magick->new(magick=>'png');
select(STDOUT); $| = 1;
binmode STDOUT;
print $q->header(-type=>'image/png');
$image->BlobToImage($blob);
$image->Write( "png:-" );
undef $image;




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

Reply via email to