Hi!

Just installed the latest release of GD on my Centos 5 server with no
installation issues and all libraries OK.
However, getting lots of:

[13973]ERR: 24: Error in Perl code: Bad file descriptor at /var/www/vhosts/
w12.org/httpdocs/glassify/indexdie.htm line 11.

And BLACK boxes behind where it should be transparent (occassionally works
fine)

http://www.twitterhit.net/glassify (without "dies" - sometimes works)
 http://www.twitterhit.net/glassify/indexdie.htm (with "dies" - shows error)

Here's the code:

[-

use GD;

my $myImage1 = GD::Image->new('/var/www/vhosts/
w12.org/httpdocs/glassify/me.jpg') || die("$!");
my $myImage2 = GD::Image->new('/var/www/vhosts/
w12.org/httpdocs/glassify/glass.png') || die("$!");

$myImage1->trueColor(1) || die("$!");
$myImage2->trueColor(1) || die("$!");

$myImage1->alphaBlending(1) || die("$!");
$myImage2->alphaBlending(1) || die("$!");

$myImage1->copy($myImage2, 0, 0, 0, 0, 48, 48);

$out_data = $myImage1->png;
open (DISPLAY,">/var/www/vhosts/w12.org/httpdocs/glassify/result.png") ||
die("wassup $!");
binmode DISPLAY;
print DISPLAY $out_data;
close DISPLAY;

-]
<img src=me.jpg><br>
<img src=result.png?[+ rand +]>


Hope  you can help,

Chris Denman

Reply via email to