diff --git a/color.php b/color.php index 6db9415..b2552c2 100755 --- a/color.php +++ b/color.php @@ -23,7 +23,13 @@ public function getColor($r=null, $g=null, $b=null) public function fill($oGd, BaseColor $bgColor) { - imagefill($oGd, 0, 0, $bgColor->toGd($oGd)); + $pImg = \PMVC\plug('image'); + imagefill( + $pImg->getGd($oGd), + 0, + 0, + $bgColor->toGd($oGd) + ); } public function hexToRgb($hex) diff --git a/src/BaseColor.php b/src/BaseColor.php index 243269c..e453b2b 100644 --- a/src/BaseColor.php +++ b/src/BaseColor.php @@ -81,8 +81,9 @@ function toRound() */ function toGd($image) { + $pImg = \PMVC\plug('image'); return imagecolorallocate( - $image, + $pImg->getGd($image), $this->r, $this->g, $this->b