src/Image.php
public function setSaveOptions($file_name = null, $directory = null, $suffix = null) {
		# Set Directory, or use Old if setted before from instance, or use img src directory
		if ($directory) {
			$this->_save_dir = rtrim($directory, DIRECTORY_SEPARATOR);
		} else if (!$this->_save_dir) {
			$this->_save_dir = $this->_image_info['dirname'];
		}

		// Check Directory
		if (!is_dir($directory)) {
			mkdir($directory, 0755, true);
		} else if (!is_writable($directory)) {
			chmod($directory, 0755);
		}

		# Set Filename
		if ($file_name) {
			$this->_save_name = basename($file_name, '.' . pathinfo($file_name, PATHINFO_EXTENSION)) . $suffix . '.' . $this->_output_format;
		} else if (!$this->_save_name) {
			$this->_save_name = $this->_image_info['filename'] . $suffix . '.' . $this->_output_format;
		}


		$this->_save_path = $this->_save_dir . DIRECTORY_SEPARATOR . $this->_save_name;

		return $this;
		# Method End
	}
public function setSaveOptions($file_name = null, $directory = null, $suffix = null) {
		# Set Directory, or use Old if setted before from instance, or use img src directory
		if ($directory) {
			$this->_save_dir = rtrim($directory, DIRECTORY_SEPARATOR);
		} else if (!$this->_save_dir) {
			$this->_save_dir = $this->_image_info['dirname'];
		}

		// Check Directory
		if (!is_dir($directory)) {
			mkdir($directory, 0755, true);
		} else if (!is_writable($directory)) {
			chmod($directory, 0755);
		}

		# Set Filename
		if ($file_name) {
			$this->_save_name = basename($file_name, '.' . pathinfo($file_name, PATHINFO_EXTENSION)) . $suffix . '.' . $this->_output_format;
		} else if (!$this->_save_name) {
			$this->_save_name = $this->_image_info['filename'] . $suffix . '.' . $this->_output_format;
		}


		$this->_save_path = $this->_save_dir . DIRECTORY_SEPARATOR . $this->_save_name;

		return $this;
		# Method End
	}
public function setSaveOptions ( $ file_name = null , $ directory = null , $ suffix = null ) { # Set Directory, or use Old if setted before from instance, or use img src directory if ( $ directory ) { $ this -> _save_dir = rtrim ( $ directory , DIRECTORY_SEPARATOR ) ; } else if ( ! $ this -> _save_dir ) { $ this -> _save_dir = $ this -> _image_info [ 'dirname' ] ; } // Check Directory if ( ! is_dir ( $ directory ) ) { mkdir ( $ directory , 0755 , true ) ; } else if ( ! is_writable ( $ directory ) ) { chmod ( $ directory , 0755 ) ; } # Set Filename if ( $ file_name ) { $ this -> _save_name = basename ( $ file_name , '.' . pathinfo ( $ file_name , PATHINFO_EXTENSION ) ) . $ suffix . '.' . $ this -> _output_format ; } else if ( ! $ this -> _save_name ) { $ this -> _save_name = $ this -> _image_info [ 'filename' ] . $ suffix . '.' . $ this -> _output_format ; } $ this -> _save_path = $ this -> _save_dir . DIRECTORY_SEPARATOR . $ this -> _save_name ; return $ this ; # Method End }
Set Saving Options
@param String  $file_name saving file name
@param String  $directory directory to save into
Set Saving Options