Click to See Complete Forum and Search --> : [RESOLVED] Problems with imagefilltoborder


KingCobra220
11-04-2007, 01:03 PM
I'm trying to fill spaces of an image with different colors. Unfortunately, the borders aren't all the same colors. To try getting around having the $border variable, I tried something like this:

$border = ImageColorAt($image,126,66); //lets say this point is white...
imagefilltoborder($image,126,66,!$border,$color);

Wouldn't this make the command fill an area until it reaches any border, since the border is defined as anything not white?

If I run this, the entire image is filled with $color. Is there any function or method to do what I need?

Edit:
It seems I always figure things out myself, right after posting them here. The solution was to use imagefill, instead of imagefilltoborder.