<?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */ // CVS: $Id: mask.php,v 1.1 2005/10/02 17:53:00 firman Exp $ /** * Load Image_Tools. */ require_once 'Image/Tools.php'; // Sets mask and sample image. $options = array( 'image' => 'images/master.png', 'mask' => 'images/mask.png', 'sample' => 'images/pear.png' ); // Create new instance of Image_Mask $toolMask =& Image_Tools::factory('mask', $options); if (PEAR::isError($toolMask)) { die($toolMask->toString()); } // Apply mask and send the result image to browser $err = $toolMask->display(); if (PEAR::isError($err)) { die($err->toString()); } /* * Local variables: * mode: php * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?>