public function changeExtension($rename)
    {
        $search = '';
        $replace = '';

        if (is_array($rename)) {
            $search = key($rename);
            $replace = current($rename);
        }

        if (is_string($rename)) {
            $search = pathinfo($this->outputPathname, PATHINFO_EXTENSION);
            $replace = $rename;
        }

        $this->outputPathname = preg_replace("#$search\$#", $replace, $this->outputPathname);

        return $this;
    }