src/Captcha/Captcha.php
private function createCaptchaImage()
	{
		
		$this->_image_resource = imagecreatetruecolor( $this->_image_info['width'], $this->_image_info['height'] );
		
		if( function_exists( 'imageantialias' ) )
			imageantialias( $this->_image_resource, true );
		
		# Get Colors Values	
		$rgb = $this->getRGBFromRange(
			$this->_image_info['color'][0],
			$this->_image_info['color'][1],
			$this->_image_info['color'][2],
			$this->_image_info['color']['range']
			);

		# Get Color;
		$background_color = imagecolorallocate(
			$this->_image_resource,					# Image Resource
			$rgb[0],								# R
			$rgb[1],								# G
			$rgb[2]									# B
			);
		
		# Apply Color
		imagefill(
			$this->_image_resource,					# Image Resource
			0,										# Positon X
			0,										# Positon Y
			$background_color						# Color
			);


		# Method End
	}
private function createCaptchaImage()
	{
		
		$this->_image_resource = imagecreatetruecolor( $this->_image_info['width'], $this->_image_info['height'] );
		
		if( function_exists( 'imageantialias' ) )
			imageantialias( $this->_image_resource, true );
		
		# Get Colors Values	
		$rgb = $this->getRGBFromRange(
			$this->_image_info['color'][0],
			$this->_image_info['color'][1],
			$this->_image_info['color'][2],
			$this->_image_info['color']['range']
			);

		# Get Color;
		$background_color = imagecolorallocate(
			$this->_image_resource,					# Image Resource
			$rgb[0],								# R
			$rgb[1],								# G
			$rgb[2]									# B
			);
		
		# Apply Color
		imagefill(
			$this->_image_resource,					# Image Resource
			0,										# Positon X
			0,										# Positon Y
			$background_color						# Color
			);


		# Method End
	}
private function createCaptchaImage ( ) { $ this -> _image_resource = imagecreatetruecolor ( $ this -> _image_info [ 'width' ] , $ this -> _image_info [ 'height' ] ) ; if ( function_exists ( 'imageantialias' ) ) imageantialias ( $ this -> _image_resource , true ) ; # Get Colors Values	 $ rgb = $ this -> getRGBFromRange ( $ this -> _image_info [ 'color' ] [ 0 ] , $ this -> _image_info [ 'color' ] [ 1 ] , $ this -> _image_info [ 'color' ] [ 2 ] , $ this -> _image_info [ 'color' ] [ 'range' ] ) ; # Get Color; $ background_color = imagecolorallocate ( $ this -> _image_resource , # Image Resource $ rgb [ 0 ] , # R $ rgb [ 1 ] , # G $ rgb [ 2 ] # B ) ; # Apply Color imagefill ( $ this -> _image_resource , # Image Resource 0 , # Positon X 0 , # Positon Y $ background_color # Color ) ; # Method End }
create capatcha image resource
create capatcha image resource