<?php
/**
 * $Horde: horde/util/barcode.php,v 1.2 2003/01/03 12:44:48 jan Exp $
 *
 * Copyright 2002-2003 Chuck Hagenbuch <chuck@horde.org>
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */

define('HORDE_BASE', dirname(__FILE__) . '/..');
require_once HORDE_BASE . '/lib/base.php';
require_once HORDE_BASE . '/lib/Image.php';

header('Pragma: public');

$image = &Horde_Image::factory(Horde::getFormData('type', 'png'));
header('Content-type: image/png');
echo $image->makeBarcode(Horde::getFormData('barcode', 'test'));
