PHP Classes

File: testTransparentImage.php

Recommend this page to a friend!
  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: 15 years ago
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(
$i= 0; $i < $layerSize; $i++) {
   
$transparentImage->add_layer($layers[$i]);
}

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