private function createImage($path) {
		$mime = $this->mimeType($path);
      
		if ($mime[2] == 'jpg') {
			return imagecreatefromjpeg ($path);
		} else if ($mime[2] == 'png') {
			return imagecreatefrompng ($path);
		} else {
			return false; 
		} 
    }