Skip to content

Commit

Permalink
fix: The Image::setOpacity method returns wrong result when opacity = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Finesse committed Jan 2, 2017
1 parent 23043b5 commit fc4256e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit fc4256e

Please sign in to comment.