Open luke83 opened 10 years ago
Hi, there is a fix:
public function pad($width, $height, $color = array(255, 255, 255, 127)) // <- add the alpha value
{
// ...
// (add following)
imagealphablending($this->workingImage, false);
imagesavealpha($this->workingImage, true);
// create the fill color
$fillColor = imagecolorallocatealpha( // <- change to ...allocatealpha
$this->workingImage,
$color[0],
$color[1],
$color[2],
$color[3] // <- add the alpha value param
);
Is there a way to make the method use transparent background (or preserve it from original image) for the padded output image?
this is how i patched GD class, i don't know if it is the correct way, also tried with preserveAlpha with no result!