mirror of
https://github.com/avecms/AVE.cms.git
synced 2025-01-22 07:20:07 +00:00
Added make progressive JPEG thumbnails
This commit is contained in:
parent
ee6fd31eed
commit
691f502d58
@ -754,7 +754,7 @@
|
||||
* @param bool $dither use dither
|
||||
* @return bool true on success, otherwise false
|
||||
*/
|
||||
function save($filename, $output_type = false, $output_quality = false, $dither = false)
|
||||
function save ($filename, $output_type = false, $output_quality = false, $dither = false)
|
||||
{
|
||||
if ($output_type === false)
|
||||
$output_type = $this->_img['main']['output_type'];
|
||||
@ -762,6 +762,7 @@
|
||||
switch ($output_type)
|
||||
{
|
||||
case 1:
|
||||
case '1':
|
||||
case 'gif':
|
||||
case 'GIF':
|
||||
if ($this->_types[1]['supported'] < 2)
|
||||
@ -807,7 +808,11 @@
|
||||
if ($output_quality === false)
|
||||
$output_quality = IMAGE_TOOLBOX_DEFAULT_JPEG_QUALITY;
|
||||
|
||||
if (defined('JPG_PROGRESSIVE') && JPG_PROGRESSIVE == true)
|
||||
imageinterlace($this->_img['main']['resource'], 1);
|
||||
|
||||
imagejpeg($this->_img['main']['resource'], $filename, $output_quality);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
@ -1155,7 +1160,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($this->_error_prefix . 'Outputwidth and -height must be integers greater zero.', E_USER_ERROR);
|
||||
trigger_error($this->_error_prefix . ' Output width and height must be integers greater zero.', E_USER_ERROR);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -212,6 +212,15 @@
|
||||
'VARIANT' => ''
|
||||
];
|
||||
|
||||
|
||||
//-- Создавать progressive JPG
|
||||
$GLOBALS['CMS_CONFIG']['_CONST_THUMBS']['JPG_PROGRESSIVE'] = [
|
||||
'DESCR' => 'Создавать progressive JPG',
|
||||
'DEFAULT' => true,
|
||||
'TYPE' => 'bool',
|
||||
'VARIANT' => ''
|
||||
];
|
||||
|
||||
//-- Генерировать миниатюрам IPTC
|
||||
$GLOBALS['CMS_CONFIG']['_CONST_THUMBS']['THUMBNAIL_IPTC'] = [
|
||||
'DESCR' => 'Генерировать миниатюрам IPTC',
|
||||
|
Loading…
x
Reference in New Issue
Block a user