public function &createIm($w, $h, $r, $g, $b, $a) { $im = imagecreatetruecolor($w, $h); imagealphablending($im, false); imagesavealpha($im, true); imagefill($im, 0, 0, imagecolorallocatealpha($im, $r, $g, $b, ImageUtil::percentToAlpha($a))); return $im; }