src/Image.php
public function saveAs($filename)
    {
        if (!$this->_isCreated && !$this->createImage()) {
            return false;
        }
        if (!$this->_tmpImageFile->saveAs($filename)) {
            $tmpFile = $this->_tmpImageFile->getFileName();
            $this->_error = "Could not copy image from tmp location '$tmpFile' to '$filename'";
            return false;
        }
        return true;
    }
public function saveAs($filename)
    {
        if (!$this->_isCreated && !$this->createImage()) {
            return false;
        }
        if (!$this->_tmpImageFile->saveAs($filename)) {
            $tmpFile = $this->_tmpImageFile->getFileName();
            $this->_error = "Could not copy image from tmp location '$tmpFile' to '$filename'";
            return false;
        }
        return true;
    }
Save the image to given filename (triggers image creation)

@param string $filename to save image as
@return bool whether image was created successfully