Skip to content

Commit

Permalink
Now prioritizing Imagick over GD
Browse files Browse the repository at this point in the history
  • Loading branch information
artyuum authored Aug 16, 2020
1 parent 6c50cd5 commit 7bd7f2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ImageHash.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ protected function defaultImplementation(): Implementation

protected function defaultDriver(): ImageManager
{
if (extension_loaded('gd')) {
return new ImageManager(['driver' => 'gd']);
}

if (extension_loaded('imagick')) {
return new ImageManager(['driver' => 'imagick']);
}

if (extension_loaded('gd')) {
return new ImageManager(['driver' => 'gd']);
}

throw new RuntimeException('Please install GD or ImageMagick');
}
Expand Down

0 comments on commit 7bd7f2d

Please sign in to comment.