Welcome to the SmartThumb hacked class (poor) home page
the last version of the class is 1.2, the author is Francesco Fullone

This class is an hack of the Thumbnail class created by Philipp v. Criegern

you can download the latest version of the SmartThumb (v. 1.2 02/03/2004) class or take a look of the source

here some demo of the class:
1. create truecolor thumbnail
2. add watermark
3. create truecolor thumbnail and add watermark

Hide the source of this demo page

Here the source of this demo page

<?php /**/ ?><html><body>
Welcome to the SmartThumb hacked class (poor) home page<br />
the last version of the class is 1.2, the author is <a href="http://fullo.no-ip.org">Francesco Fullone</a><br />
<p>This class is an hack of the <a href="http://www.smartphp.net/content/classes/thumbnail/Creating_Thumbnails.html">Thumbnail</a> class created by <a href="http://www.smartphp.net">Philipp v. Criegern</a></p>
<p>you can download the latest version of the <a href="smartthumb-1.2.zip">SmartThumb</a> (v.
  1.2 02/03/2004) class or take a look of the <a href="index.php?source=class">source</a></p>
here some demo of the class:<br />
1. <a href="index.php?ie=1">create truecolor thumbnail</a><br />
2. <a href="index.php?ie=2">add watermark</a><br />
3. <a href="index.php?ie=3">create truecolor thumbnail and add watermark</a><br />

<?php

    
require_once "class.thumbnail.php";

    
$img = new Thumbnail();

    
$img->thumbnail_dir_internal  =  './thumb/';
    
$img->thumbnail_dir_external  =  './thumb/';
    
    
/**
     * ie. 1. resize an image
     */
    
if ($_GET['ie']=='1') {
        
$img->max_width               =  300;
        
$img->create'frisbee.jpg' );
        echo 
'<hr />resize an image:<br /> 1. original image:<br /> <img src="frisbee.jpg"><br />';
        echo 
'2. resized image (' $img->image_name '):<br />' .$img->image_tag;
    }

    
/**
     * ie. 2. add a watermark to an image
     */
    
if ($_GET['ie']=='2') {
        
$img->watermark_file          'fullo.png';
        
$img->PNG_watermark'3374.jpg' );    
        echo 
'<hr />add a watermark to an image:<br />1. original image:<br /> <img src="3374.jpg"><br />';
        echo 
'2. my watermark:<br /><img src="fullo.png"><br />3. watermarked images (' $img->image_name '):<br />' .$img->image_tag;
    }

    
/**
     * ie. 3. resize an image and add a watermark
     */
    
if ($_GET['ie']=='3') {
        
$img->max_width               =  120;
        
$img->max_height              =  120;
        
$img->watermark_file          'logo.png';
        
$img->create'armyofdarkness.jpg' );
        echo 
'<hr />resize & watermark:<br />1. original image:<br /> <img src="armyofdarkness.jpg"><br />2. resized image:<br /> '.$img->image_tag;
        
$img->PNG_watermark$img->thumbnail_dir_internal$img->image_name );
        echo 
'<br />3. my watermark:<br /><img src="logo.png"> <br />4. watermarked image (' $img->image_name '):<br /> ' .$img->image_tag;
    }

    
/**
     * show the source of this page
     */
     
if ($_GET['source']=='this') {
        echo 
'<hr /><b>Hide the <a href="index.php"><b>source</b></a> of this demo page</b><br />';
        echo 
'<br /><b>Here the source of this demo page</b> <hr /><br />';
        
highlight_file('index.php');    
     } elseif (
$_GET['source']=='class') {
        echo 
'<hr />look at the <a href="index.php?source=this"><b>source</b></a> of this demo page<br />';
        echo 
"<br /><b>Here the source of the SmartThumb class</b> <hr /><br />";
        
highlight_file('class.thumbnail.php');             
     } else {
        echo 
'<hr />look at the <a href="index.php?source=this"><b>source</b></a> of this demo page';
     }  
?>

</body></html>