I found this nice tutorial to resize an image,
I tried to add it in order to resize ll the images in a directory, but its not working, I cant figure out whats wrong?
include("resize-class.php");
$dirname = "images/".$_GET['id']."/";
$dirthumbsname = "images/".$_GET['id']."/thumbs/";
$images = scandir($dirname);
$ignore = Array(".", "..","feature.jpg","bad","thumbs");
foreach($images as $curimg){
if(!in_array($curimg, $ignore)) {
// *** 1) Initialise / load image
$resizeObj = new resize($dirname.$curimg);
// *** 2) Resize image (options: exact, portrait, landscape, auto, crop)
$resizeObj -> resizeImage(200, 200, 'exact');
// *** 3) Save image
$resizeObj -> saveImage($dirthumbsname.$curimg, 100);
}
}
thanks…