Any ImageMagick Gurus out there? I need HELP!

Any ImageMagick Gurus out there? I need HELP!

am 07.11.2006 20:33:28 von ihatzi

Ok, I am pulling what is left of my hair out on this one.

I am trying to make a hit counter where the numbers are overlaid onto a
background image.

I have the numbers 0,1, 2...9 saved as individual GIF images with a
color set to be the transparent background color. The background is a
GIF without any transparent color definition.

When I composite the number images to the background, the transparent
color shows up as white rather than displaying the background.

I am using CorelDraw12 to create the GIF images.

Here is my code:

$hits="001486";

for ($i = 0; $i <= 6; $i++) {
$numbers->Read( . "num-" . substr($hits, $i, 1) . ".gif");
}
$numbers = $numbers->montage(tile=>"7x1", mode=>"Concatenate");

$counter->Read("background.gif");
$counter->Composite(image=>$numbers, compose=>'over',x=>10, y=>10);

binmode STDOUT;
print "Content-type: image/gif\n\n";
$counter->Write("gif:-");

Any clue why this would not work?
Thanks for the help

Ion

Re: Any ImageMagick Gurus out there? I need HELP!

am 09.11.2006 10:02:00 von Ron Savage

On Wed, 8 Nov 2006 06:33:28 +1100, ihatzi@hotmail.com wrote:

Hi

> $hits=3D"001486";
>
> for ($i =3D 0; $i <=3D 6; $i++) {

Err, surely you mean $i < length($hits)? So $i < 6.

> $numbers->Read( . "num-" . substr($hits, $i, 1) . ".gif");

No error checking.

>}
> $numbers =3D $numbers->montage(tile=3D>"7x1", mode=3D>"Concatenate");
>
> $counter->Read("background.gif");

No error checking.

> $counter->Composite(image=3D>$numbers, compose=3D>'over',x=3D>10, y=3D>10);

No error checking.

> binmode STDOUT;
> print "Content-type: image/gif\n\n";
> $counter->Write("gif:-");

No error checking.