| 
<?php
/**
 * Usage example of "thumbs" class.
 */
 require "class.thumbs.php";
 
 /**
 * Your photos are in the directory "photos".
 * The class will generate the thumbnails into the directory> "photos/thumbs/", with the default settings.
 */
 $thumbs = new thumbs("./photos/");
 $thumbs->creates_thumbs();
 
 /**
 * Create grayscale thumbnails
 */
 $thumbs->_directory = "./photos/";
 $thumbs->_thumbs_directory = "gray/";
 $thumbs->_thumbs_name = "_gray";
 $thumbs->_gray_scale = true;
 $thumbs->creates_thumbs();
 
 exit;
 
 /**
 * The class will generate the thumbnails into the directory> "photos/thumbs/".
 * And all thumbs will be 120x120 px and JPEG Quality of 50%
 */
 $thumbs = new thumbs("photos/", 0, "thumbs/", false, 0, 100, false, 120, 120);
 $thumbs->creates_thumbs();
 
 /**
 * The class will generate the thumbnails into the directory> "photos/". But the name of they will be:
 * "nameoforiginalphoto_thumb.ext", "nameoforiginalphoto2_thumb.ext", etc..
 */
 $thumbs = new thumbs("./photos/", false, false, "_thumb");
 $thumbs->creates_thumbs();
 ?>
 |