/web/htdocs/www.harmattan.it/home/img/viaggi_gallery/sample02.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.9
 *
 */
include "SmartImage.class.php";

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

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

// Put a Water Mark and save to file
$img->addWaterMarkImage($waterMark);
$img->saveImage($destination."new02.jpg");

// save the image with 76% resolution in Jpeg
$img->saveImage($destination."new03.jpg"76);

// output image
$img->printImage();

//convert and save it in gif and png and close the file
$img->saveImage($destination."new04.gif");
$img->saveImage($destination."new05.png");
$img->close();

?>