Skip to content

Commit

Permalink
Merge pull request #59 from artyuum/patch-1
Browse files Browse the repository at this point in the history
Now prioritizing Imagick over GD
  • Loading branch information
jenssegers authored Aug 17, 2020
2 parents 6c50cd5 + 7bd7f2d commit 3f3c6d9
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 3f3c6d9

Please sign in to comment.