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: 5 years ago
Size: 660 bytes


Class file image Download
 * 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

 * 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");