FIX Generated thumbs must always use the png format so using thumbs can
work.
This commit is contained in:
parent
be8384389f
commit
c0b2d7405a
@ -1467,10 +1467,10 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
|
||||
{
|
||||
// Create small thumbs for image (Ratio is near 16/9)
|
||||
// Used on logon for example
|
||||
$imgThumbSmall = vignette($destpath, $maxwidthsmall, $maxheightsmall, '_small', 50, "thumbs");
|
||||
$imgThumbSmall = vignette($destpath, $maxwidthsmall, $maxheightsmall, '_small', 50, "thumbs", IMAGETYPE_PNG);
|
||||
// Create mini thumbs for image (Ratio is near 16/9)
|
||||
// Used on menu or for setup page for example
|
||||
$imgThumbMini = vignette($destpath, $maxwidthmini, $maxheightmini, '_mini', 50, "thumbs");
|
||||
$imgThumbMini = vignette($destpath, $maxwidthmini, $maxheightmini, '_mini', 50, "thumbs", IMAGETYPE_PNG);
|
||||
}
|
||||
|
||||
setEventMessages($langs->trans("FileTransferComplete"), null, 'mesgs');
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user