Skip to content

Commit

Permalink
Implement brightness
Browse files Browse the repository at this point in the history
  • Loading branch information
riasvdv committed Jan 17, 2025
1 parent 7defd5f commit 2e0ae50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Drivers/Vips/VipsDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ public function getHeight(): int

public function brightness(int $brightness): static
{
// TODO: Implement brightness() method.
$brightness = 1 + ($brightness / 100);

$this->image = $this->image->linear([$brightness, $brightness, $brightness], [0, 0, 0]);

return $this;
}

public function gamma(float $gamma): static
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e0ae50

Please sign in to comment.