Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/rotate/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/rotate/index.php  >  Download  
File: examples/rotate/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:57
Size: 815 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)
 */
$rotate_left tulipIP::rotate($imageTIP_ROTATE_LEFT);
$rotate_right tulipIP::rotate($imageTIP_ROTATE_RIGHT);
$rotate_upside_down tulipIP::rotate($imageTIP_ROTATE_UPSIDE_DOWN);


/**
 * Save All created resources
 */

$dest "./";

tulipIP::saveImage($dest$imageTIP_PNG"original");
tulipIP::saveImage($dest$rotate_leftTIP_PNG"rotate-left");
tulipIP::saveImage($dest$rotate_rightTIP_PNG"rotate-right");
tulipIP::saveImage($dest$rotate_upside_downTIP_PNG"rotate-upside-down");
?>