<?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */ // CVS: $Id: marquee.php,v 1.1 2005/10/02 17:53:00 firman Exp $ /** * Load Image_Tools marquee tool */ require_once 'Image/Tools.php'; // Create destination image when masked sample image will be draw. $filename = 'images/master.png'; $destImage = imagecreatefrompng($filename); // Sets sample image, x position and y position. $options = array( 'image' => $destImage, 'sample' => 'images/pear.png', 'x' => 10, 'y' => 10 ); // Create new Image_Tools_Marquee object instance $toolMarquee =& Image_Tools::factory('marquee', $options); if (PEAR::isError($toolMarquee)) { die($toolMarquee->toString()); } // Sets rectangle marquee $toolMarquee->setRectangleMarquee(10, 10, 40, 40); // Apply marquee to the image and send it to browser $err = $toolMarquee->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: */ ?>