<?php $bg = imagecreatefromjpeg("we.jpg"); $kol = imagecolorclosest($bg,1,255,254); imagecolorset($bg,$kol,255,0,255); imagejpeg($bg); ?>
Niestety nie dziala.Pytanie: jakiej funkcji zapomnialem dopisac albo co jest nie tak?
Z gory dzieki

<?php $bg = imagecreatefromjpeg("we.jpg"); $kol = imagecolorclosest($bg,1,255,254); imagecolorset($bg,$kol,255,0,255); imagejpeg($bg); ?>
$filename = "we.jpg"; $im = imagecreatefromjpeg($filename); $background_color = imagecolorallocate( $im, $_background_color[0], $_background_color[1], $_background_color[2] ); imagefilledrectangle($im, 0, 0, $_width-1, $_height-1, $background_color); imagejpeg($im);
<?php $bg = imagecreatefrompng("we.png"); $szerokosc=$size[0]; $wysokosc=$size[1]; for($a=0;$a<$wysokosc;$a++){ for($b=0;$b<$szerokosc;$b++){ $rgb = imagecolorat($obrazc, $b, $a); $colors = imagecolorsforindex($obrazc, $rgb); $kolor = $colors["red"].','.$colors["green"].','.$colors["blue"]; if ($kolor=='107,107,191'){ $background_color = imagecolorallocate($obrazc,0,255,0); imagefilledrectangle($obrazc, $b, $a, $b, $a, $background_color); } } } ImagePng($obrazc); ImageDestroy($obrazc); ?>