From 68479181fc880d624013b0ad657233d66606cd07 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 4 Aug 2024 08:41:09 +0200 Subject: [PATCH] Reactivate blending color methods on ImageInterface --- src/Drivers/Gd/Encoders/PngEncoder.php | 8 ++------ src/Interfaces/ImageInterface.php | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Drivers/Gd/Encoders/PngEncoder.php b/src/Drivers/Gd/Encoders/PngEncoder.php index 3e4fdec8..b4600a83 100644 --- a/src/Drivers/Gd/Encoders/PngEncoder.php +++ b/src/Drivers/Gd/Encoders/PngEncoder.php @@ -53,12 +53,8 @@ private function prepareOutput(ImageInterface $image): GdImage // clone output instance $output = Cloner::cloneEmpty($image->core()->native()); - /** - * Decode configured blending color - * - * @var Color - */ - $blendingColor = $this->driver()->handleInput($this->driver()->config()->blendingColor); + // Decode configured blending color + $blendingColor = $image->blendingColor(); // allocate blending color with slighty different alpha value // to avoid "overwriting" pixels with the same color in the diff --git a/src/Interfaces/ImageInterface.php b/src/Interfaces/ImageInterface.php index 726c5207..efd9e221 100644 --- a/src/Interfaces/ImageInterface.php +++ b/src/Interfaces/ImageInterface.php @@ -254,7 +254,6 @@ public function pickColors(int $x, int $y): CollectionInterface; * Return color that is mixed with transparent areas when converting to a format which * does not support transparency. * - * @deprecated Use configuration options of image manager instead * @throws RuntimeException * @return ColorInterface */ @@ -264,7 +263,6 @@ public function blendingColor(): ColorInterface; * Set blending color will have no effect unless image is converted into a format * which does not support transparency. * - * @deprecated Use configuration options of image manager instead * @param mixed $color * @throws RuntimeException * @return ImageInterface