Wie erhöhe ich die Farbe der anzuzeigenden Bilder???
Code:
include("functions.php"); function img_klein($mid){ $path = $ORDNER."pics/pic".$mid.""; function createimage($width, $height){ $imgh = imagecreate($width, $height); $bgc = imagecolorallocate($imgh, 255, 2550, 16000); return $imgh; } //if($path){ // Thumbnail $height = 80; // Maximalhöhe $width = 80; // Maximalbreite $img_size = getimagesize($path); $img_size[4] = $img_size[1]/$height; $faktor = 100/$img_size[4]; $img_size[1] = $img_size[1]/100; $img_size[0] = $img_size[0]/100; $img_size[1] = $img_size[1]*$faktor; $img_size[0] = $img_size[0]*$faktor; if($img_size[0] >= 120){ $img_size[4] = $img_size[0]/$width; $faktor2 = 100/$img_size[4]; if($faktor2 << $faktor){ $img_size[1] = $img_size[1]/100; $img_size[0] = $img_size[0]/100; $img_size[1] = $img_size[1]*$faktor2; $img_size[0] = $img_size[0]*$faktor2; } } $imgh = createimage($img_size[0], $img_size[1]); $imgh2 = imagecreatefromjpeg($path); $imgsz = getimagesize($path); $black = imagecolorallocate($imgh2,255, 255, 255); $black2 = imagecolorallocate($imgh2,0, 0, 0); $black3 = imagecolorallocate($imgh2,255, 0, 0); $black4 = imagecolorallocate($imgh2,0, 255, 0); $black5 = imagecolorallocate($imgh2,0, 0, 255); $black3 = imagecolorallocate($imgh2,255, 255, 0); $black4 = imagecolorallocate($imgh2,0, 255, 255); $black5 = imagecolorallocate($imgh2,255, 0, 255); imagecopyresized($imgh, $imgh2, 0, 0, 0, 0, $img_size[0], $img_size[1], $imgsz[0], $imgsz[1]); header('Content-Type: image/jpeg'); imagejpeg($imgh, '', 100); //require "pics/pic99"; imagedestroy($imgh); //} //echo "[img]" . $file . "[/img] "; } img_klein($mid); ?>
Kommentar