$longest ) $longest = strlen( $line ); } $width = $longest * imagefontwidth( $_FONT ); $myimg = imagecreate( $width , $height ); // Ratio Lines begin if ($ratio<=0.33) { //RED $background = imagecolorallocate( $myimg , 205 , 0 , 0 ); #imagecolortransparent( $myimg , $background ); $textcolor = imagecolorallocate( $myimg , 220 , 220 , 220 ); } elseif ($ratio<= 0.67) { //AMBER $background = imagecolorallocate( $myimg , 255 , 215 , 0 ); #imagecolortransparent( $myimg , $background ); $textcolor = imagecolorallocate( $myimg , 0 , 0 , 0 ); } elseif ($ratio = 0.00) { } else { //green $background = imagecolorallocate( $myimg , 125 , 255 , 0 ); #imagecolortransparent( $myimg , $background ); $textcolor = imagecolorallocate( $myimg , 0 , 0 , 0 ); } for( $x = 0 , $y = count( $lines ); $x < $y; $x++ ) imagestring( $myimg , $_FONT , 0 , $x * imagefontheight( $_FONT ) , $lines[ $x ] , $textcolor ); $outimg = imagecreate( round( $width * $_MULT ) , round( $height * $_MULT ) ); $outbackground = imagecolorallocate( $outimg , 255 , 255 , 255 ); imagecolortransparent( $outimg , $outbackground ); imagecopyresized( $outimg , $myimg , 0 , 0 , 0 , 0 , round( $width * $_MULT ) , round( $height * $_MULT ) , $width , $height ); $image = ImageCreate ($width, $height); ImageAlphaBlending($image, true); ImagePNG($outimg, $pngdir . $row["username"] . ".png"); //header( "Content-type: text/html" ); $bbcode = $bbcode . "[url=" . $siteURL . "][img]" . $pngpath . $row["username"] . ".png[/img][/url]n"; echo "
"; echo <<