|
@@ -301,7 +301,7 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x=0, $s
|
|
|
* @param string $extName Extension to differenciate thumb file name ('_small', '_mini')
|
|
|
* @param int $quality Quality of compression (0=worst, 100=best)
|
|
|
* @param string $outdir Directory where to store thumb
|
|
|
- * @param int $targetformat New format of target (1,2,3,... or 0 to keep old format)
|
|
|
+ * @param int $targetformat New format of target (IMAGETYPE_GIF, IMAGETYPE_JPG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_WBMP ... or 0 to keep old format)
|
|
|
* @return string Full path of thumb or '' if it fails
|
|
|
*/
|
|
|
function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $quality=50, $outdir='thumbs', $targetformat=0)
|
|
@@ -473,6 +473,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $
|
|
|
}
|
|
|
|
|
|
// Initialisation des variables selon l'extension de l'image
|
|
|
+ // $targetformat is 0 by default, in such case, we keep original extension
|
|
|
switch($targetformat)
|
|
|
{
|
|
|
case IMAGETYPE_GIF: // 1
|