<?
/**
 * Image_XBM example script.
 * Create XBM, copy photo, draw photo frame and
 * (if Text_Figlet available) draw some text
 *
 * @package Image_XBM
 */

include_once 'Image/XBM.php';

$xbm = &new Image_XBM;
$xbm->createFromFile('photo.xbm');
$sx $xbm->getWidth();
$sy $xbm->getHeight();

$out = &new Image_XBM;
$out->create($sx$sy);

// Draw photoframe
$out->setstyle(array(IMAGE_XBM_BLACKIMAGE_XBM_WHITEIMAGE_XBM_BLACKIMAGE_XBM_BLACKIMAGE_XBM_BLACK));
$out->drawrectangle(00$sx-1$sy-1IMG_COLOR_STYLED);

$out->copy($xbm5555$sx-10$sy-10);
$out->drawfiglettext('Hello, Julia!''xbriteb.flf''2x2'IMAGE_XBM_BLACKIMAGE_XBM_TRANS1010);
$out->drawfiglettext(' Image_XBM Package ''6x10.flf'1IMAGE_XBM_BLACKIMAGE_XBM_WHITE$sx-145$sy-20);

header('Content-type: image/xbm');
$out->output();
?>