guarda se può funzionare:
codice:header("Content-type: image/jpeg"); $im = imagecreatetruecolor(10, 100); $background = imagecolorallocate($im, 255, 255, 255); imagefilledrectangle($im, 0, 0, 10, 100, $background); $percentuale=60; $temp=127/$percentuale; for ($i=1;$i<$percentuale;$i++){ $colore = imagecolorallocatealpha($im, 255, 0, 0, $temp*$i); imagefilledrectangle($im, 0, $i, 10, $i+1, $colore); imagecolordeallocate($im, $colore); } imagejpeg($im); imagedestroy($im);
![]()