mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-12-22 09:42:39 +00:00
Verbose output with die at end
This commit is contained in:
parent
a952729268
commit
6d57b39575
@ -68,7 +68,7 @@
|
|||||||
//imagejpeg($dimg,$dest,100);
|
//imagejpeg($dimg,$dest,100);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createThumbs(){ // Generates a thumbnail for every image in the Pictures directory
|
function createThumbs(){ // Generates a thumbnail for every image in the Pictures directory - Resource heavy
|
||||||
$pathToImages = 'Pictures/';
|
$pathToImages = 'Pictures/';
|
||||||
$pathToThumbs = 'thumbs/';
|
$pathToThumbs = 'thumbs/';
|
||||||
$dir = opendir( $pathToImages );
|
$dir = opendir( $pathToImages );
|
||||||
@ -123,19 +123,20 @@
|
|||||||
switch(strtolower($stype)) {
|
switch(strtolower($stype)) {
|
||||||
case 'gif':
|
case 'gif':
|
||||||
imagegif($dimg, "{$pathToThumbs}{$fname}" ,100);
|
imagegif($dimg, "{$pathToThumbs}{$fname}" ,100);
|
||||||
echo ". Done. <img src='C:\\users\\c0de\\Desktop\\thumbs\\$fname'><br>\n";
|
echo ". Done. <img src='thumbs/$fname'><br>\n";
|
||||||
break;
|
break;
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
imagejpeg($dimg, "{$pathToThumbs}{$fname}" ,100);
|
imagejpeg($dimg, "{$pathToThumbs}{$fname}" ,100);
|
||||||
echo ". Done. <img src='C:\\users\\c0de\\Desktop\\thumbs\\$fname'><br>\n";
|
echo ". Done. <img src='thumbs/$fname'><br>\n";
|
||||||
break;
|
break;
|
||||||
case 'png':
|
case 'png':
|
||||||
imagepng($dimg, "{$pathToThumbs}{$fname}" ,9);
|
imagepng($dimg, "{$pathToThumbs}{$fname}" ,9);
|
||||||
echo ". Done. <img src='C:\\users\\c0de\\Desktop\\thumbs\\$fname'><br>\n";
|
echo ". Done. <img src='thumbs/$fname'><br>\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir( $dir );
|
closedir( $dir );
|
||||||
|
die("<script>alert('All thumbnails have been refreshed.');</script>");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user