Hi, i met a very strange PHP behaviour, i don't understand why it behaves like this. I'm using the imagesetbrush function in this way:
class foo
{
function setbrush($image)
{
//$this->_resource contains the main image resource
imagesetbrush($this->_resource, $image);
}
}
...
$res=imagecreatefrompng("image.png");
$class->setbrush($res);
in this way it works, but if i change the code like this:
class foo
{
function setbrush($image)
{
$res=imagecreatefrompng($image);
imagesetbrush($this->_resource, $res);
}
}
...
$class->setbrush("image.png");
it doesn't work anymore. Do you see some error? It doesn't show me any message it simply doesn't execute the function.