src/Captcha/Captcha.php
private function fixCaptchaImage(){
		
		# Final equired image width must be
		# Last _front_text x position + initial_x
		
		$final_width = $this->_front_text['x'] + $this->_front_text['initial_x'];
		
		# check if to set final width
		if( $this->_image_info['width'] > $final_width )
			$this->_image_info['width'] = $final_width; 
		
		
		$this->_final_image = imagecreatetruecolor( $this->_image_info['width'], $this->_image_info['height'] );
		
		if( function_exists( 'imageantialias' ) )
			imageantialias( $this->_final_image, true );
		
		
		imagecopy(
					$this->_final_image,				# destination image resource to copy into
					$this->_image_resource,				# source image resource to copy from
					0,									# start x position to copy into in destination image
					0,									# start y position to copy into in destination image
					0,									# start x position to copy from in source image
					0,									# start y position to copy from in source image
					$this->_image_info['width'],		# width to copy from source image 
					$this->_image_info['height'] 		# height to copy from source image
				 );
		
		# Removing the first image from memory
		imagedestroy( $this->_image_resource );
		
		# Method End
	}
private function fixCaptchaImage(){
		
		# Final equired image width must be
		# Last _front_text x position + initial_x
		
		$final_width = $this->_front_text['x'] + $this->_front_text['initial_x'];
		
		# check if to set final width
		if( $this->_image_info['width'] > $final_width )
			$this->_image_info['width'] = $final_width; 
		
		
		$this->_final_image = imagecreatetruecolor( $this->_image_info['width'], $this->_image_info['height'] );
		
		if( function_exists( 'imageantialias' ) )
			imageantialias( $this->_final_image, true );
		
		
		imagecopy(
					$this->_final_image,				# destination image resource to copy into
					$this->_image_resource,				# source image resource to copy from
					0,									# start x position to copy into in destination image
					0,									# start y position to copy into in destination image
					0,									# start x position to copy from in source image
					0,									# start y position to copy from in source image
					$this->_image_info['width'],		# width to copy from source image 
					$this->_image_info['height'] 		# height to copy from source image
				 );
		
		# Removing the first image from memory
		imagedestroy( $this->_image_resource );
		
		# Method End
	}
private function fixCaptchaImage ( ) { # Final equired image width must be # Last _front_text x position + initial_x $ final_width = $ this -> _front_text [ 'x' ] + $ this -> _front_text [ 'initial_x' ] ; # check if to set final width if ( $ this -> _image_info [ 'width' ] > $ final_width ) $ this -> _image_info [ 'width' ] = $ final_width ; $ this -> _final_image = imagecreatetruecolor ( $ this -> _image_info [ 'width' ] , $ this -> _image_info [ 'height' ] ) ; if ( function_exists ( 'imageantialias' ) ) imageantialias ( $ this -> _final_image , true ) ; imagecopy ( $ this -> _final_image , # destination image resource to copy into $ this -> _image_resource , # source image resource to copy from 0 , # start x position to copy into in destination image 0 , # start y position to copy into in destination image 0 , # start x position to copy from in source image 0 , # start y position to copy from in source image $ this -> _image_info [ 'width' ] , # width to copy from source image  $ this -> _image_info [ 'height' ] # height to copy from source image ) ; # Removing the first image from memory imagedestroy ( $ this -> _image_resource ) ; # Method End }
Fix Final Capatcha image Size if needed
Fix Final Capatcha image Size if needed