public function saveImage($pathToImage)
    {
        if (is_dir($pathToImage)) {
            $pathToImage = rtrim($pathToImage, '\/').DIRECTORY_SEPARATOR.$this->page.'.'.$this->outputFormat;
        }

        $imageData = $this->getImageData($pathToImage);

        return file_put_contents($pathToImage, $imageData) !== false;
    }
public function saveImage($pathToImage)
    {
        if (is_dir($pathToImage)) {
            $pathToImage = rtrim($pathToImage, '\/').DIRECTORY_SEPARATOR.$this->page.'.'.$this->outputFormat;
        }

        $imageData = $this->getImageData($pathToImage);

        return file_put_contents($pathToImage, $imageData) !== false;
    }
public function saveImage ( $ pathToImage ) { if ( is_dir ( $ pathToImage ) ) { $ pathToImage = rtrim ( $ pathToImage , '\/' ) . DIRECTORY_SEPARATOR . $ this -> page . '.' . $ this -> outputFormat ; } $ imageData = $ this -> getImageData ( $ pathToImage ) ; return file_put_contents ( $ pathToImage , $ imageData ) !== false ; }
Save the image to the given path.

@param string $pathToImage

@return bool
Save the image to the given path .