(PHP 4 >= 4.0.6, PHP 5, PHP 7)
imagealphablending — 锟借定图锟斤拷幕锟缴J�
$image
, bool $blendmode
) : bool
imagealphablending()
锟斤拷锟斤拷锟斤拷锟斤拷锟缴硷拷锟斤拷锟绞癸拷锟斤拷锟斤拷植锟酵拷幕婊J斤拷锟斤拷诨锟缴拷锟絙lending锟斤拷模式锟铰o拷alpha
通锟斤拷色锟绞成凤拷锟结供锟斤拷锟斤拷锟叫的绘画锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 imagesetpixel()
锟斤拷锟斤拷锟阶诧拷锟斤拷锟缴︼拷诤锟斤拷殖潭锟斤拷媳锟斤拷锟斤拷锟斤拷锟斤拷锟酵革拷锟斤拷锟斤拷锟轿拷锟斤拷锟斤拷GD
锟皆讹拷锟斤拷锟矫碉拷锟斤拷锟叫碉拷锟斤拷色锟酵伙拷锟斤拷锟斤拷色锟斤拷希锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷图锟斤拷锟叫★拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷遣锟酵革拷锟斤拷摹锟斤拷诜腔锟缴J斤拷拢锟斤拷锟斤拷锟斤拷锟缴拷锟酵拷锟�
alpha 通锟斤拷锟斤拷息一锟金被匡拷锟斤拷锟斤拷锟芥换锟斤拷目锟斤拷锟斤拷锟截★拷锟斤拷色模式锟节伙拷锟斤拷色锟斤拷图锟斤拷时锟斤拷锟斤拷锟矫★拷锟斤拷锟�
blendmode
为 TRUE
锟斤拷锟斤拷锟斤拷锟矫伙拷色模式锟斤拷锟斤拷锟斤拷乇铡锟斤拷晒锟绞憋拷锟斤拷锟� TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
Note: 锟剿猴拷锟斤拷锟斤拷要 GD 2.0.1 锟斤拷锟斤拷甙姹�(锟狡硷拷 2.0.28 锟斤拷锟斤拷锟竭版本)锟斤拷
image
锟斤拷图锟襟创斤拷锟斤拷锟斤拷(锟斤拷锟斤拷imagecreatetruecolor())锟斤拷锟截碉拷图锟斤拷锟斤拷源锟斤拷
blendmode
Whether to enable the blending mode or not. On true color images
the default value is TRUE
otherwise the default value is FALSE
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
Example #1 imagealphablending() usage example
<?php
// Create image
$im = imagecreatetruecolor(100, 100);
// Set alphablending to on
imagealphablending($im, true);
// Draw a square
imagefilledrectangle($im, 30, 30, 70, 70, imagecolorallocate($im, 255, 0, 0));
// Output
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
Note: 锟剿猴拷锟斤拷锟斤拷要 GD 2.0.1 锟斤拷锟斤拷甙姹�(锟狡硷拷 2.0.28 锟斤拷锟斤拷锟竭版本)锟斤拷