I'm making an animated gif with perl and i'm using the gd module. I use the newFromPng method to import images. Then i'm working on an animation that looks like:
use GD;
$img = GD::Image->newFromPng('test1.png');
$img2 = GD::Image->newFromPng('test2.png');
$img3 = GD::Image->newFromPng('test3.png');
$data = $img->gifanimbegin(1,0);
$data.=$img->gifanimadd(0,0,0,1);
$data.=$img2->gifanimadd(0,0,0,1);
$data.=$img3->gifanimadd(0,0,0,1);
$data.=$img->gifanimend;
binmode STDOUT;
print $data;
I can't provide code to demonstrate my problem.But my problem is that the image colors get mixed up, so the screen starts blinking. |