public function renderImage(IconImage $image, $w = null, $h = null, array $opts = null)
    {
        $opts = is_array($opts) ? $opts : [];
        $opts['w'] = $w;
        $opts['h'] = $h;
        return $this->renderer->render($image, $opts);
    }
public function renderImage(IconImage $image, $w = null, $h = null, array $opts = null)
    {
        $opts = is_array($opts) ? $opts : [];
        $opts['w'] = $w;
        $opts['h'] = $h;
        return $this->renderer->render($image, $opts);
    }
public function renderImage ( IconImage $ image , $ w = null , $ h = null , array $ opts = null ) { $ opts = is_array ( $ opts ) ? $ opts : [ ] ; $ opts [ 'w' ] = $ w ; $ opts [ 'h' ] = $ h ; return $ this -> renderer -> render ( $ image , $ opts ) ; }
Renders an IconImage at a desired width and height.

@param IconImage $image Image obtained from an Icon object.
@param integer $w Desired width - if null, width of IconImage is used.
@param integer $h Desired height - if null, height of IconImage is used.
@param array $opts Array of renderer options. The built in renderer supports an optional 'background'
element in this array. Normally, the result will use alpha transparency, but you can
pass a hex colour to choose the colour of the transparent area instead, e.g.
['background=>'#ffffff'] for a white background.
@return mixed              The built in renderer will return a gd image resource, which you could save with
the gd function imagepng(), for example. If you swap in an alternative renderer,
the result is whatever that renderer returns.
@throws \InvalidArgumentException if IconImage or options are invalid.
Renders an IconImage at a desired width and height .