PHP Classes

File: sample01.php

Recommend this page to a friend!
  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: 16 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(400, 220, true);
$img->saveImage($destination."new01.jpg");

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

?>