<?php
require('./ImageBooth.php');
$raw_image = imagecreatefromjpeg('./captcha.jpg');
$overlay_image = imagecreatefrompng('./captcha2.png');
$checks = imagecreatefrompng('./checks.png');
$image = ImageBooth::newImage(70, 200);
$image->newLayer($raw_image, 'base');
$image->newLayer($checks, 'checks');
$image->newLayer($overlay_image, 'overlay');
$image->filter('blur', array('amount'=>'400'));
$image->operate('color_replace', array('origin_color'=>'333388', 'destination_color'=>'CC0000'));
$image->operate('brightness_contrast', array('brightness_adjustment'=>-20, 'contrast_adjustment'=>20));
$image->operate('negative');
$image->selectLayer('checks');
$image->transform('rotate', array('angle'=>15));
$image->resize(400, 200);
$image->resizeCanvas(500, 500);
$image->dumpToBrowser();
?>
|