Skip to content

Commit

Permalink
fix: Image::__construct() doesn't load the filename
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Dec 18, 2023
1 parent 3398bb4 commit aa468f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class Image implements ImageDriver
public function __construct(protected ?string $pathToImage = null)
{
$this->imageDriver = new ImagickDriver();

if ($this->pathToImage) {
$this->imageDriver->loadFile($this->pathToImage);
}
}

public static function load(string $pathToImage): static
Expand Down

0 comments on commit aa468f3

Please sign in to comment.