PHP Classes

File: test.imagemask.php

Recommend this page to a friend!
  Classes of Andrew Collington   Image Masking   test.imagemask.php   Download  
File: test.imagemask.php
Role: Example script
Content type: text/plain
Description: A test file
Class: Image Masking
Apply masks to an image and output the cut image
Author: By
Last change:
Date: 20 years ago
Size: 375 bytes
 

Contents

Class file image Download
<?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');
        }
    }

?>