PHP Classes

File: sample_dias.php

Recommend this page to a friend!
  Classes of Ilja Müller   Thumbs   sample_dias.php   Download  
File: sample_dias.php
Role: Example script
Content type: text/plain
Description: sample for the class Dias
Class: Thumbs
generate thumbnails of image files in a directory
Author: By
Last change:
Date: 18 years ago
Size: 744 bytes
 

Contents

Class file image Download
<?php

include("./class_thumbs.php") ;
include(
"./class_dias.php") ;

// create a new Thumbs-Object(str "imagepath", str thumb_prefix, int width, int height [, int fix ])
// last (4th) parameter is optional and desides whether the size of all thumbs is
// limited/fixed by width, height or both (0 = both, 1 = width, 2 = height)
$cThumbs = new Thumbs("./pictures", "t_", 100, 100, 0);
// get the array of all found images and thumbs
$mix = $cThumbs->getImages();
// devide the mix into images- and thumbs-arrays
list($images, $thumbs) = $mix;

// create a new Dia-Pannel
$cDias = new Dias($images, $thumbs);
// print table (int columns, int cellWidth, int cellHeight, bool print-filenames)
$cDias->output(6, 140, 140, 1);

?>