diff --git a/src/Image.php b/src/Image.php index 3cd4df9..14e368d 100755 --- a/src/Image.php +++ b/src/Image.php @@ -397,7 +397,7 @@ function setOpacity( $opacity ) return $this; } - $restLayersOpacity = ceil( $opacity ) - 1; + $restLayersOpacity = max( ceil( $opacity ) - 1, 0 ); $firstLayerOpacity = $opacity - $restLayersOpacity; $bitmap = static::copyBitmap( $this->bitmap );