protected function initSourceImageResource() 
    { 
    	$ext = $this->getExtension();
    	
    	switch($ext) {
		case 'gif':
			$this->sourceImageResource = ImageCreateFromGif($this->sourceImagePath);
			break;
    	
		case 'jpg':
			$this->sourceImageResource = ImageCreateFromJpeg($this->sourceImagePath);
			break;
    	
		case 'png':
			$this->sourceImageResource = ImageCreateFromPng($this->sourceImagePath);
			break;
    	
		default:
			throw new \RuntimeException("An error occurred trying to create the image, extension '" . $ext. "' is not supported");
			break;
    	}
    	
    	return $this;
    }
protected function initSourceImageResource() 
    { 
    	$ext = $this->getExtension();
    	
    	switch($ext) {
		case 'gif':
			$this->sourceImageResource = ImageCreateFromGif($this->sourceImagePath);
			break;
    	
		case 'jpg':
			$this->sourceImageResource = ImageCreateFromJpeg($this->sourceImagePath);
			break;
    	
		case 'png':
			$this->sourceImageResource = ImageCreateFromPng($this->sourceImagePath);
			break;
    	
		default:
			throw new \RuntimeException("An error occurred trying to create the image, extension '" . $ext. "' is not supported");
			break;
    	}
    	
    	return $this;
    }
protected function initSourceImageResource ( ) { $ ext = $ this -> getExtension ( ) ; switch ( $ ext ) { case 'gif' : $ this -> sourceImageResource = ImageCreateFromGif ( $ this -> sourceImagePath ) ; break ; case 'jpg' : $ this -> sourceImageResource = ImageCreateFromJpeg ( $ this -> sourceImagePath ) ; break ; case 'png' : $ this -> sourceImageResource = ImageCreateFromPng ( $ this -> sourceImagePath ) ; break ; default : throw new \ RuntimeException ( "An error occurred trying to create the image, extension '" . $ ext . "' is not supported" ) ; break ; } return $ this ; }
Init the source image resource

@throws \RuntimeException
@return \Thumbnailer\Thumbnailer\Thumbnailer
Init the source image resource