Ignore:
Timestamp:
Feb 18, 2011, 5:34:50 PM (13 years ago)
Author:
mistic100
Message:

[extensions] PHP Optimisateur

  • fix many path bugs
  • debug some plugins
  • add ratio detection for ConvertPan
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PHP_Optimisateur/include/main.php

    r9201 r9276  
    7171        preg_match('#(.*)/(.*).([a-z]{3})$#', $FilesSortie[$i], $matches);
    7272        $FileFolder = $matches[1].'/'; // dossier de sortie
    73         $FileName = $matches[2].'.jpg'; // nom final
     73        $FileName = $matches[2]; // nom final
    7474        $FileExt = $matches[3]; // extension orginale
    7575               
     
    101101        // Compresse les fichiers dans le dossier de sortie
    102102        if (!isset($BlockNormal)) {
    103                 exec('include\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMnormal'].' '.$CONF['DIMnormal'].' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"');
     103                exec('include\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMnormal'].' '.$CONF['DIMnormal'].' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"');
    104104        }
    105105        if (!isset($BlockThumbnail)) {
    106                 exec('include\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMthumbnail'].' '.$CONF['DIMthumbnail'].' -rmeta -rexifthumb "'.$FilesSource[$i].'"');
     106                exec('include\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'.jpg" -dpi 72 '.$CONF['convOptions'].' -resize '.$CONF['DIMthumbnail'].' '.$CONF['DIMthumbnail'].' -rmeta -rexifthumb "'.$FilesSource[$i].'"');
    107107        }
    108108        if (!isset($BlockHigh) AND $CONF['DIRhighORNOT']) {
    109109                if ($CONF['DIMhdORNOT']) {
    110                         exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.'" -dpi '.$CONF['DPI'].' '.$CONF['convOptions'].' -resize '.$CONF['DIMhd'].' '.$CONF['DIMhd'].' '.$CONF['copyHD'].' "'.$FilesSource[$i].'"');
     110                        exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.'.jpg" -dpi '.$CONF['DPI'].' '.$CONF['convOptions'].' -resize '.$CONF['DIMhd'].' '.$CONF['DIMhd'].' '.$CONF['copyHD'].' "'.$FilesSource[$i].'"');
    111111                } else if (!in_array($FileExt, $CONF['JPGexts'])) {
    112                         exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.'" "'.$FilesSource[$i].'"');
     112                        exec('include\nconvert.exe -q '.$CONF['Qhd'].' -out jpeg -o "'.$FileFolder.'pwg_high/'.$FileName.'.jpg" "'.$FilesSource[$i].'"');
    113113                } else {
    114                         copy($FilesSource[$i], $FileFolder.'pwg_high/'.$FileName);
     114                        copy($FilesSource[$i], $FileFolder.'pwg_high/'.$FileName.'.jpg');
    115115                }
    116116        }
     
    132132                rmdir($dir);
    133133        } else if ($CONF['indexORNOT']) {
    134                 copy('includes/index.php', $dir.'/index.php');
     134                copy('include/index.php', $dir.'/index.php');
    135135        }
    136136}
Note: See TracChangeset for help on using the changeset viewer.