Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/flip/index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of hyyan  >  Tulip Image Processor  >  examples/flip/index.php  >  Download  
File: examples/flip/index.php
Role: Example script
Content type: text/plain
Description: index
Class: Tulip Image Processor
Apply different types of effects to images
Author: By
Last change:
Date: 2012-07-01 18:53
Size: 793 bytes
 

Contents

Class file image Download
<?php
/**
 * Require The tuliIP class
 */
require_once '../../tulipIP/tulipIP.class.php';

/**
 * Load The Image From Source File
 */
$path "../../src.jpg";
$image tulipIP::loadImage($path);

/**
 * Note: flip method return new gd resource and has no effects in the given gd gd resource($image)
 */
$flip_horizental tulipIP::flip($imageTIP_FLIP_HORIZONTAL);
$flip_vertical tulipIP::flip($imageTIP_FLIP_VERTICAL);
$flip_both tulipIP::flip($imageTIP_FLIP_BOTH);


/**
 * Save All created resources
 */

$dest "./";

tulipIP::saveImage($dest$imageTIP_PNG"original");
tulipIP::saveImage($dest$flip_horizentalTIP_PNG"flib-horizental");
tulipIP::saveImage($dest$flip_verticalTIP_PNG"flip-vertical");
tulipIP::saveImage($dest$flip_bothTIP_PNG"flip-both");
?>