With with resizing images

Ok what am I doing wrong, I'm passing the images in a directory to it to resize them but I can't seem to get it to work. Any help would be great...

Here is my code
<?php
include_once('easyphpthumbnail.class.php');

$path_to_images = "../photos/".$_GET['type']; // path to your images

function getImagesList($path) {
$ctr = 0;
if ( $img_dir = @opendir($path) ) {
while ( false !== ($img_file = readdir($img_dir)) ) {
// can add checks for other image file types here
if ( preg_match("/(\.gif|\.jpg)$/", $img_file) ) {
$images[$ctr] = $img_file;
$ctr++;
}
}
closedir($img_dir);
return $images;
}
return false;
}

$image = getImagesList($path_to_images);

$numArray = count($image);

for ($i=0;$i<$numArray;$i++) {
$imageArray[] = "'".$image[$i]."'";
}

$comma_separated = implode(",", $imageArray);

$thumb = new easyphpthumbnail;
$thumb -> Thumbsize = 400;
$thumb -> Thumblocation = $path_to_images;

$thumb -> Createthumb(array($comma_separated),'file');

echo $comma_separated;

?>

Code debugging

It's difficult to debug your code, best advise is:

  1. Start with the 'simple' example and image provided on this website to check if everything works on your webserver
  2. Try the batch resize example code
  3. Debug your own code step by step, output the paths to your images, the thumblocation (should be a directory), the array, ...

At some stage you will find the error, it's probably something with paths not being correct or images that are too large!

Path save as bug

Your problem was related to a bug in version 1.0.1; it was only possible to save images in the root directory of the class. Download the latest version that incorporates this bug fix.