Verbose output with die at end

This commit is contained in:
alopexc0de 2013-02-19 02:25:52 -05:00
parent a952729268
commit 6d57b39575

View File

@ -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>");
} }
?> ?>