mirror of
https://github.com/Intervention/image.git
synced 2025-09-03 02:42:45 +02:00
Fix bug
Imagick renders full transparent colors as black. But I want to render a color like "rgba(255, 255, 255, 0)" as white in a image with no transparency.
This commit is contained in:
@@ -22,6 +22,10 @@ class JpegEncoder extends DriverSpecializedEncoder
|
|||||||
->colorProcessor($image->colorspace())
|
->colorProcessor($image->colorspace())
|
||||||
->colorToNative($image->blendingColor());
|
->colorToNative($image->blendingColor());
|
||||||
|
|
||||||
|
// set alpha value to 1 because Imagick renders
|
||||||
|
// possible full transparent colors as black
|
||||||
|
$background->setColorValue(Imagick::COLOR_ALPHA, 1);
|
||||||
|
|
||||||
$imagick = $image->core()->native();
|
$imagick = $image->core()->native();
|
||||||
$imagick->setImageBackgroundColor($background);
|
$imagick->setImageBackgroundColor($background);
|
||||||
$imagick->setBackgroundColor($background);
|
$imagick->setBackgroundColor($background);
|
||||||
|
Reference in New Issue
Block a user