PHP Classes

File: examples/savingCash/index.php

Recommend this page to a friend!
  Classes of hyyan   Tulip Image Processor   examples/savingCash/index.php   Download  
File: examples/savingCash/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: 11 years ago
Size: 660 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);

/*
 * save compressed gd2 casg file so we can restore it after
 * page refresh or sudden shutdown or ....
 */

$dest = "./";
tulipIP::saveGD($dest, $image, "cash-file");

// destroy the resource
imagedestroy($image);

/**
 * Load The Casg File From dest
 */

$image=tulipIP::loadGD($dest, "cash-file");

// save the result
header('Content-type:' . TIP_PNG);
tulipIP::saveImage(null, $image);
tulipIP::saveImage($dest, $image, TIP_JPG, "Loaded From Cash File");
?>