- <?php
- ini_set('error_reporting', E_ALL);
- ini_set('display_errors', true);
- $return_convert = 0;
- $CONVERT='C:/httpd/ImageMagick/convert.exe';
- $PIC_BASEDIR='C:/Users/m0nn3/Pictures';
- $HTTP_ROOT='C:/httpd/htdocs';
- $CAMS=array('02', '03', '04', '05', '06', '07', '08');
- //$CAMS=array('7');
- foreach ($CAMS as $CAM)
- {
- $PICS_ORIGINAL[]=$PIC_BASEDIR.'/original/'.$CAM.'/';
- }
- foreach ($PICS_ORIGINAL as $CAMDIR)
- {
- $files = scandir($CAMDIR);
- foreach ($files as $file)
- {
- if(is_file($CAMDIR.$file))
- if(!is_file(str_replace('original', 'resized', str_replace('C:/Users/m0nn3/Pictures','C:/httpd/htdocs', $CAMDIR.$file))))
- {
- system($CONVERT.' -quality 100 -geometry 400 '.$CAMDIR.$file.' '.str_replace('original', 'resized', str_replace('C:/Users/m0nn3/Pictures','C:/httpd/htdocs', $CAMDIR.$file)), $return_convert);
- if($return_convert != 0)
- echo 'fehler beim umwandeln von '.$CAMDIR.$file."\n";
- }
- }
- }
- $handle = @fopen("C:/httpd/htdocs/pictures.list", "w");
- foreach ($CAMS as $CAM)
- {
- $PICS_RESIZED[]=$HTTP_ROOT.'/resized/'.$CAM.'/';
- }
- foreach ($PICS_RESIZED as $CAMDIR)
- {
- $files = scandir($CAMDIR);
- foreach ($files as $file)
- {
- // if(finfo_file($finfo, $CAMDIR.$file) == "image/jpeg")
- if(is_file($CAMDIR.$file))
- fputs($handle, str_replace($HTTP_ROOT,'',$CAMDIR.$file)."\n");
- }
- }
- fclose($handle);
- echo '</pre>';
- echo '</body></html>';
- ?>
Posted by file_searchphp on Tue 12th Jun 22:57
download
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.