src/sb/Image.php
public function write($text, $params=array())
    {
        $color = (isset($params['color'])) ?  $params['color'] : array(0, 0, 0);
        $color = imagecolorallocate($this->edited, $color[0], $color[1], $color[2]);
        $size = (isset($params['size']))? $params['size'] : 5;
        $x = (isset($params['x']))? $params['x'] : 2;
        $y = (isset($params['y']))? $params['y'] : 2;


        imagestring($this->edited, $size, $x, $y, $text, $color);
    }
public function write($text, $params=array())
    {
        $color = (isset($params['color'])) ?  $params['color'] : array(0, 0, 0);
        $color = imagecolorallocate($this->edited, $color[0], $color[1], $color[2]);
        $size = (isset($params['size']))? $params['size'] : 5;
        $x = (isset($params['x']))? $params['x'] : 2;
        $y = (isset($params['y']))? $params['y'] : 2;


        imagestring($this->edited, $size, $x, $y, $text, $color);
    }
public function write ( $ text , $ params = array ( ) ) { $ color = ( isset ( $ params [ 'color' ] ) ) ? $ params [ 'color' ] : array ( 0 , 0 , 0 ) ; $ color = imagecolorallocate ( $ this -> edited , $ color [ 0 ] , $ color [ 1 ] , $ color [ 2 ] ) ; $ size = ( isset ( $ params [ 'size' ] ) ) ? $ params [ 'size' ] : 5 ; $ x = ( isset ( $ params [ 'x' ] ) ) ? $ params [ 'x' ] : 2 ; $ y = ( isset ( $ params [ 'y' ] ) ) ? $ params [ 'y' ] : 2 ; imagestring ( $ this -> edited , $ size , $ x , $ y , $ text , $ color ) ; }
Write text onto an image

@param string $text
@param array $params color array(r,g,b), size, x, y
Write text onto an image