<?php require 'class.imagemask.php'; $im = new imageMask($_POST['colour']); $im->setDebugging(false); $im->maskOption($_POST['position']); if ($im->loadImage(dirname(__FILE__) . "/pictures/{$_POST['file']}")) { if ($im->applyMask(dirname(__FILE__) . "/masks/{$_POST['mask']}")) { $im->showImage('png'); } }?>