Project

General

Profile

Bug #20950 » 11816_4.3.1.patch

Administrator Admin, 2010-01-15 15:57

View differences:

typo3_src/t3lib/class.t3lib_iconworks.php 2010-01-14 16:56:55.000000000 +0100
// 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);
(5-5/5)