Login   Register  
PHP Classes
elePHPant
Icontem

File: testTransparentImage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ilaya  >  Transparent Image  >  testTransparentImage.php  >  Download  
File: testTransparentImage.php
Role: Example script
Content type: text/plain
Description: testTransparentImage
Class: Transparent Image
Create an image from a set of transparent images
Author: By
Last change:
Date: 2009-01-12 02:27
Size: 751 bytes
 

Contents

Class file image Download
<?php

include_once "transparentimage.class.php";

//creating a new instance of your shiny new avatar class :)
$transparentImage = new TransparentImage;

//set the image width
$transparentImage->set_height(300);
$transparentImage->set_width(204);

// setting output file
$output_file "output/output.png";
$transparentImage->set_filename($output_file);

// prepare the layer images
$layers[] = "images/test1.png";
$layers[] = "images/test2.png";
$layers[] = "images/test3.png";
$layers[] = "images/test4.png";
$layers[] = "images/test5.png";

$layerSize count($layers);
for(
$i0$i $layerSize$i++) {
    
$transparentImage->add_layer($layers[$i]);
}

//create new avatar image for this user
$transparentImage->build();