Hi,
this is the script i made
// Create image
$img = imagecreatetruecolor($w, $h);
// Transparent image
$white = imagecolorallocate($img,255,255,255);
imagefilledrectangle($img,0,0,$w,$h,$white);
imagecolortransparent($img, $white);
//imagealphablending( $img, true );
//imagesavealpha( $img, true );
// Shape color
$bgColor = imagecolorallocatealpha($img, 100, 250, 250, 70);
imagefilledrectangle($img, 15, 20, 50, 100, $bgColor);
imagefilledrectangle($img, 10, 25, 60, 100, $bgColor);
imagepng($img, 'file.png');
the problem is the rectangles are transparent among them but not with the background
i mean, i need to create a transparent image with a semi transparent shape inside
any suggestions?
thanks for your help