Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Set the blending mode for an image
<?php imagealphablending(GdImage $image, bool $enable): bool
<?php $filling = $color->getInt();
}
imagealphablending($resource, true);
if (is_int($x) && is_int($y)) {
<?php $target = $image_size->relativePosition($watermark_size);
imagealphablending($image->getCore(), true);
return imagecopy($image->getCore(), $watermark->getCore(), $target->x, $target->y, 0, 0, $watermark_size->width, $watermark_size->height);
}
}
<?php $mask->resize($image_size->width, $image_size->height);
}
imagealphablending($canvas->getCore(), false);
if ( ! $mask_w_alpha) {
<?php $transparent = imagecolorallocatealpha($canvas->getCore(), 255, 255, 255, 127);
imagealphablending($canvas->getCore(), false); // do not blend / just overwrite
imagefilledrectangle($canvas->getCore(), $dst_x, $dst_y, $dst_x + $src_w - 1, $dst_y + $src_h - 1, $transparent);
<?php imagefill($modified, 0, 0, $transColor);
imagecolortransparent($modified, $transColor);
} else {
imagealphablending($modified, false);
imagesavealpha($modified, true);
}
<?php $canvas = imagecreatetruecolor($width, $height);
imagealphablending($canvas, false);
$transparent = imagecolorallocatealpha($canvas, 255, 255, 255, 127);
imagefilledrectangle($canvas, 0, 0, $width, $height, $transparent);
imagecolortransparent($canvas, $transparent);
<?php $transparent = imagecolorallocatealpha($canvas, 255, 255, 255, 127);
imagefilledrectangle($canvas, 0, 0, $width, $height, $transparent);
imagecolortransparent($canvas, $transparent);
imagealphablending($canvas, true);
imagecopy($canvas, $resource, 0, 0, 0, 0, $width, $height);
<?php $width = imagesx($core);
$height = imagesy($core);
$clone = imagecreatetruecolor($width, $height);
imagealphablending($clone, false);
imagesavealpha($clone, true);
$transparency = imagecolorallocatealpha($clone, 0, 0, 0, 127);
imagefill($clone, 0, 0, $transparency);
<?php {
ob_start();
$resource = $this->image->getCore();
imagealphablending($resource, false);
imagesavealpha($resource, true);
imagepng($resource, null, -1);
$this->image->mime = image_type_to_mime_type(IMAGETYPE_PNG);
<?php ob_start();
imagepalettetotruecolor($this->image->getCore());
imagealphablending($this->image->getCore(), true);
imagesavealpha($this->image->getCore(), true);
imagewebp($this->image->getCore(), null, $this->quality);
$this->image->mime = defined('IMAGETYPE_WEBP') ? image_type_to_mime_type(IMAGETYPE_WEBP) : 'image/webp';
<?php }
imagealphablending($image->getCore(), true);
imagettftext($image->getCore(), $this->getPointSize(), $this->angle, $posx, $posy, $color->getInt(), $this->file, $this->text);