public function base64($sString, $iWidth = null, $iHeight = null)
    {
        $rImg = $this->generateBarcode($sString, $iWidth, $iHeight);

        if ($rImg) {

            ob_start();
            imagepng($rImg);
            $sContents = ob_get_contents();
            ob_end_clean();

            return base64_encode($sContents);

        } else {

            return false;
        }
    }