Bug #20950 » typo3_11816.patch
typo3_src/t3lib/class.t3lib_iconworks.php 2009-08-28 17:21:37.000000000 +0200 | ||
---|---|---|
// Converting to gray scale, dimming the icon:
|
||
if (($mode=='disabled') OR ($mode!='futuretiming' && $mode!='no_icon_found' && !(!$mode && $user))) {
|
||
for ($c = 0; $c<ImageColorsTotal($im); $c++) {
|
||
$cols = ImageColorsForIndex($im, $c);
|
||
$newcol = round(($cols['red']+$cols['green']+$cols['blue'])/3);
|
||
$lighten = ($mode=='disabled') ? 2.5 : 2;
|
||
$newcol = round(255-((255-$newcol)/$lighten));
|
||
ImageColorSet($im, $c, $newcol, $newcol, $newcol);
|
||
}
|
||
imagefilter($im, IMG_FILTER_CONTRAST, 10);
|
||
}
|
||
// Applying user icon, if there are access control on the item:
|
||
if ($user) {
|
||
... | ... | |
*/
|
||
public static function imagemake($im, $path) {
|
||
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
|
||
imagesavealpha($im, true);
|
||
@ImagePng($im, $path);
|
||
} else {
|
||
@ImageGif($im, $path);
|