public function allocate(&$im) {
        $allocated = imagecolorallocate($im, $this->r, $this->g, $this->b);
        if ($this->transparent) {
            return imagecolortransparent($im, $allocated);
        } else {
            return $allocated;
        }
    }
public function allocate(&$im) {
        $allocated = imagecolorallocate($im, $this->r, $this->g, $this->b);
        if ($this->transparent) {
            return imagecolortransparent($im, $allocated);
        } else {
            return $allocated;
        }
    }
public function allocate ( & $ im ) { $ allocated = imagecolorallocate ( $ im , $ this -> r , $ this -> g , $ this -> b ) ; if ( $ this -> transparent ) { return imagecolortransparent ( $ im , $ allocated ) ; } else { return $ allocated ; } }
Returns the int value for PHP color.

@param resource $im
@return int
Returns the int value for PHP color .