Current time: 07-07-2024, 12:51 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ERLEDIGT] PHP und GD Library bundled (Debian Lenny)
Author Message
FraggDieb Offline
Member
***

Posts: 252
Joined: Feb 2008
Reputation: 0
Post: #8
RE: [ERLEDIGT] PHP und GD Library bundled (Debian Lenny)
"The filters described here were written for the PHP-bundled build of GD, and may not be available in other releases. "
http://www.tuxradar.com/practicalphp/11/2/15

In der conf.d von php5 steht die gd.ini drin.
Er sacht aber:
Quote:function imagegreyscale(&$img, $dither=1) {
if (!($t = imagecolorstotal($img))) {
imagetruecolortopalette($img, $dither, 256);
$t = imagecolorstotal($img);
}
for ($c = 0; $c < $t; $c++) {
$col = imagecolorsforindex($img, $c);
$min = min($col['red'],$col['green'],$col['blue']);
$max = max($col['red'],$col['green'],$col['blue']);
$r= $g= $b= ($max+$min)/2;
imagecolorset($img, $c, $r, $g, $b);
}
}

und

if (function_exists('ImageFilter')) {
ImageFilter($thumb, IMG_FILTER_GRAYSCALE);
} else {
imagegreyscale($thumb);
}

provisorisch gelöst jedoch frisst die funktion natürlich mehr leistung aber die bilder werden ja gecached, trotzdem nciht schön aber funktioniert Big Grin
Problematisch?
04-19-2010 05:48 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [ERLEDIGT] PHP und GD Library bundled (Debian Lenny) - FraggDieb - 04-19-2010 05:48 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)