Skip to content

Commit b01dcfe

Browse files
committed
Switch default image builder from GD to Imagick
1 parent 155613f commit b01dcfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BarcodeGeneratorPNG.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ class BarcodeGeneratorPNG extends BarcodeGenerator
1414
public function __construct()
1515
{
1616
// Auto switch between GD and Imagick based on what is installed
17-
if (function_exists('imagecreate')) {
18-
$this->useImagick = false;
19-
} elseif (extension_loaded('imagick')) {
17+
if (extension_loaded('imagick')) {
2018
$this->useImagick = true;
19+
} elseif (function_exists('imagecreate')) {
20+
$this->useImagick = false;
2121
} else {
2222
throw new BarcodeException('Neither gd-lib or imagick are installed!');
2323
}

0 commit comments

Comments
 (0)