original_string: function _addImage($argc, $args)
      {
          if (($argc == 2 || $argc == 3) && is_int($args[0]) && is_int($args[1]) && (is_string($args[2]) || !isset($args[2])))
          {
              //neues leeres bild mit width und height (fillcolor optional)
              $this->_img['operator']['width'] = $args[0];
              $this->_img['operator']['height'] = $args[1];
              ($this->_img['operator']['width'] >= $this->_img['operator']['height']) ? ($this->_img['operator']['bias'] = IMAGE_TOOLBOX_BIAS_HORIZONTAL) : ($this->_img['operator']['bias'] = IMAGE_TOOLBOX_BIAS_VERTICAL);
              $this->_img['operator']['aspectratio'] = $this->_img['operator']['width'] / $this->_img['operator']['height'];
              $this->_img['operator']['indexedcolors'] = 0;
              $functionname = $this->_imagecreatefunction;
              $this->_img['operator']['resource'] = $functionname($this->_img['operator']['width'], $this->_img['operator']['height']);
              // set default type jpg.
              $this->_img['operator']['type'] = 2;
              if (isset($args[2]) && is_string($args[2]))
              {
                  //neues bild mit farbe f�llen
                  $fillcolor = $this->_hexToPHPColor($args[2]);
                  imagefill($this->_img['operator']['resource'], 0, 0, $fillcolor);
                  $this->_img['operator']['color'] = $fillcolor;
              }
              else
              {
                  $this->_img['operator']['color'] = 0;
              }
          }
          elseif ($argc == 1 && is_string($args[0]))
          {
              //bild aus datei laden. width und height original gr�sse
              $this->_img['operator'] = $this->_loadFile($args[0]);
              $this->_img['operator']['indexedcolors'] = imagecolorstotal($this->_img['operator']['resource']);
              $this->_img['operator']['color'] = -1;
          }
          else
          {
              return false;
          }
          return true;
      }
code: function _addImage($argc, $args)
      {
          if (($argc == 2 || $argc == 3) && is_int($args[0]) && is_int($args[1]) && (is_string($args[2]) || !isset($args[2])))
          {
              //neues leeres bild mit width und height (fillcolor optional)
              $this->_img['operator']['width'] = $args[0];
              $this->_img['operator']['height'] = $args[1];
              ($this->_img['operator']['width'] >= $this->_img['operator']['height']) ? ($this->_img['operator']['bias'] = IMAGE_TOOLBOX_BIAS_HORIZONTAL) : ($this->_img['operator']['bias'] = IMAGE_TOOLBOX_BIAS_VERTICAL);
              $this->_img['operator']['aspectratio'] = $this->_img['operator']['width'] / $this->_img['operator']['height'];
              $this->_img['operator']['indexedcolors'] = 0;
              $functionname = $this->_imagecreatefunction;
              $this->_img['operator']['resource'] = $functionname($this->_img['operator']['width'], $this->_img['operator']['height']);
              // set default type jpg.
              $this->_img['operator']['type'] = 2;
              if (isset($args[2]) && is_string($args[2]))
              {
                  //neues bild mit farbe f�llen
                  $fillcolor = $this->_hexToPHPColor($args[2]);
                  imagefill($this->_img['operator']['resource'], 0, 0, $fillcolor);
                  $this->_img['operator']['color'] = $fillcolor;
              }
              else
              {
                  $this->_img['operator']['color'] = 0;
              }
          }
          elseif ($argc == 1 && is_string($args[0]))
          {
              //bild aus datei laden. width und height original gr�sse
              $this->_img['operator'] = $this->_loadFile($args[0]);
              $this->_img['operator']['indexedcolors'] = imagecolorstotal($this->_img['operator']['resource']);
              $this->_img['operator']['color'] = -1;
          }
          else
          {
              return false;
          }
          return true;
      }
code_tokens: function _addImage ( $ argc , $ args ) { if ( ( $ argc == 2 || $ argc == 3 ) && is_int ( $ args [ 0 ] ) && is_int ( $ args [ 1 ] ) && ( is_string ( $ args [ 2 ] ) || ! isset ( $ args [ 2 ] ) ) ) { //neues leeres bild mit width und height (fillcolor optional) $ this -> _img [ 'operator' ] [ 'width' ] = $ args [ 0 ] ; $ this -> _img [ 'operator' ] [ 'height' ] = $ args [ 1 ] ; ( $ this -> _img [ 'operator' ] [ 'width' ] >= $ this -> _img [ 'operator' ] [ 'height' ] ) ? ( $ this -> _img [ 'operator' ] [ 'bias' ] = IMAGE_TOOLBOX_BIAS_HORIZONTAL ) : ( $ this -> _img [ 'operator' ] [ 'bias' ] = IMAGE_TOOLBOX_BIAS_VERTICAL ) ; $ this -> _img [ 'operator' ] [ 'aspectratio' ] = $ this -> _img [ 'operator' ] [ 'width' ] / $ this -> _img [ 'operator' ] [ 'height' ] ; $ this -> _img [ 'operator' ] [ 'indexedcolors' ] = 0 ; $ functionname = $ this -> _imagecreatefunction ; $ this -> _img [ 'operator' ] [ 'resource' ] = $ functionname ( $ this -> _img [ 'operator' ] [ 'width' ] , $ this -> _img [ 'operator' ] [ 'height' ] ) ; // set default type jpg. $ this -> _img [ 'operator' ] [ 'type' ] = 2 ; if ( isset ( $ args [ 2 ] ) && is_string ( $ args [ 2 ] ) ) { //neues bild mit farbe f�llen $ fillcolor = $ this -> _hexToPHPColor ( $ args [ 2 ] ) ; imagefill ( $ this -> _img [ 'operator' ] [ 'resource' ] , 0 , 0 , $ fillcolor ) ; $ this -> _img [ 'operator' ] [ 'color' ] = $ fillcolor ; } else { $ this -> _img [ 'operator' ] [ 'color' ] = 0 ; } } elseif ( $ argc == 1 && is_string ( $ args [ 0 ] ) ) { //bild aus datei laden. width und height original gr�sse $ this -> _img [ 'operator' ] = $ this -> _loadFile ( $ args [ 0 ] ) ; $ this -> _img [ 'operator' ] [ 'indexedcolors' ] = imagecolorstotal ( $ this -> _img [ 'operator' ] [ 'resource' ] ) ; $ this -> _img [ 'operator' ] [ 'color' ] = - 1 ; } else { return false ; } return true ; }
docstring: Generate a new image resource based on the given parameters
  
  Parameter:
  <i>string</i> <b>$file</b> imagefile to load<br>
  Or:<br>
  <i>integer</i> <b>$width</b> imagewidth of new image to be created<br>
  <i>integer</i> <b>$height</b> imageheight of new image to be created<br>
  <i>string</i> <b>$fillcolor</b> optional fill the new image with this color (hexformat, e.g. '#FF0000')<br>
  
  @access private
docstring_tokens: Generate a new image resource based on the given parameters