Last change
on this file since 9201 was
9201,
checked in by mistic100, 13 years ago
|
[tools] PHP Optimisateur :
- Correction de bugs
- La plupart des types de fichiers sont supportés (testé avec jpg, png et gif)
- Réécriture de la gestion des plugins
- Nouvelle apparence
|
File size:
1.6 KB
|
Line | |
---|
1 | <?php |
---|
2 | /***************************************\ |
---|
3 | | PHP OPTIMISATEUR | |
---|
4 | | Plugin ConvertPan 1.1 | |
---|
5 | \***************************************/ |
---|
6 | |
---|
7 | ## Crée des images normales plus hautes pour les panoramas (utilisation des paMOOrama par exemple) |
---|
8 | ## Crée des miniatures rognées pour ne pas avoir de minuscules images |
---|
9 | |
---|
10 | $NAMEpanorama = $CONF['Plugins']['convert_pan']['NAMEpanorama']; // Suffixe des panoramas |
---|
11 | $DIMpanorama = $CONF['Plugins']['convert_pan']['DIMpanorama']; // Hauteur des panoramas normaux |
---|
12 | $RatioPanThumb = $CONF['Plugins']['convert_pan']['RatioPanThumb']; // Ratio des miniatures |
---|
13 | |
---|
14 | if (strpos($FileName, $NAMEpanorama) !== false) { |
---|
15 | if (!isset($BlockNormal) AND $DIMpanorama != 0) { |
---|
16 | exec('files\nconvert.exe -q '.$CONF['Qnormal'].' -out jpeg -o "'.$FileFolder.$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize 0 '.$DIMpanorama.' '.$CONF['copyNormal'].' "'.$FilesSource[$i].'"'); |
---|
17 | $BlockNormal = true; |
---|
18 | } |
---|
19 | |
---|
20 | if (!isset($BlockThumbnail) AND $RatioPanThumb != 0) { |
---|
21 | $DIMthumbnailV = $CONF['DIMthumbnail']/$CONF['Plugins']['convert_pan']['RatioPanThumb']; |
---|
22 | |
---|
23 | // on prend la miniature au milieu du panorama |
---|
24 | $tmp_x = $FileInfos['Width'] * $DIMthumbnailV / $FileInfos['Height']; |
---|
25 | $offset_x = ($tmp_x - $CONF['DIMthumbnail']) / 2; |
---|
26 | |
---|
27 | exec('files\nconvert.exe -q '.$CONF['Qthumbnail'].' -out jpeg -o "'.$FileFolder.'thumbnail/'.$CONF['prefixe_mini'].$FileName.'" -dpi 72 '.$CONF['convOptions'].' -resize 0 '.$DIMthumbnailV.' -crop '.$offset_x.' 0 '.$CONF['DIMthumbnail'].' '.$DIMthumbnailV.' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); |
---|
28 | $BlockThumbnail = true; |
---|
29 | } |
---|
30 | } |
---|
31 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.