Login   Register  
PHP Classes
elePHPant
Icontem

File: sample01.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alessandro Coscia  >  Smart Image  >  sample01.php  >  Download  
File: sample01.php
Role: Example script
Content type: text/plain
Description: Firts Example
Class: Smart Image
Resize and add watermarks to images
Author: By
Last change:
Date: 7 years ago
Size: 589 bytes
 

Contents

Class file image Download
<?php

/**
 * Smart, easy and simple Image Manipulation
 * 
 * @author Alessandro Coscia, Milano, Italy, php_staff@yahoo.it
 * http://www.codicefacile.it/smartimage
 * @copyright LGPL
 * @version 0.8.4
 *
 */
include "SmartImage.class.php";

// Settings
$src "images/car.jpg";
$waterMark "images/smartimage.gif";
$destination "newimages/";

// Start!
$img = new SmartImage($src);
// Resize and save file
$img->resize(400220true);
$img->saveImage($destination."new01.jpg");

echo 
"Done! See this link <a href='{$destination}new01.jpg'>New Image</a>";

?>