original_string: protected function gdImageBackground($image, $bgcolor){
  
  		if( $bgcolor == 'transparent' ){
  			imagesavealpha($image,true);
  			$bgcolor1 = imagecolorallocatealpha($image, 255, 255, 255, 127);
  
  		}else{
  			list($r, $g, $b) = sscanf($bgcolor, "#%02x%02x%02x");
  			$bgcolor1 = imagecolorallocate($image, $r, $g, $b);
  		}
  
  		imagefill($image, 0, 0, $bgcolor1);
  	}
code: protected function gdImageBackground($image, $bgcolor){
  
  		if( $bgcolor == 'transparent' ){
  			imagesavealpha($image,true);
  			$bgcolor1 = imagecolorallocatealpha($image, 255, 255, 255, 127);
  
  		}else{
  			list($r, $g, $b) = sscanf($bgcolor, "#%02x%02x%02x");
  			$bgcolor1 = imagecolorallocate($image, $r, $g, $b);
  		}
  
  		imagefill($image, 0, 0, $bgcolor1);
  	}
code_tokens: protected function gdImageBackground ( $ image , $ bgcolor ) { if ( $ bgcolor == 'transparent' ) { imagesavealpha ( $ image , true ) ; $ bgcolor1 = imagecolorallocatealpha ( $ image , 255 , 255 , 255 , 127 ) ; } else { list ( $ r , $ g , $ b ) = sscanf ( $ bgcolor , "#%02x%02x%02x" ) ; $ bgcolor1 = imagecolorallocate ( $ image , $ r , $ g , $ b ) ; } imagefill ( $ image , 0 , 0 , $ bgcolor1 ) ; }
docstring: Assign the proper background to a gd image
  
  @param resource $image gd image resource
  @param string $bgcolor background color in #rrggbb format
docstring_tokens: Assign the proper background to a gd image