Skip to content

Commit 9b0db3c

Browse files
update imagick function
Dont use 'none' there as jpg does not have transparency. This will result in a black image when using imagick.
1 parent f754cbd commit 9b0db3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BarcodeGeneratorJPG.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getBarcode($code, $type, $widthFactor = 2, $totalHeight = 30, $c
3838
$imagick = true;
3939
$colorForeground = new \imagickpixel('rgb(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ')');
4040
$jpg = new \Imagick();
41-
$jpg->newImage($width, $height, 'none', 'jpg');
41+
$jpg->newImage($width, $height, 'white', 'jpg');
4242
$imageMagickObject = new \imagickdraw();
4343
$imageMagickObject->setFillColor($colorForeground);
4444
} else {
@@ -74,4 +74,4 @@ public function getBarcode($code, $type, $widthFactor = 2, $totalHeight = 30, $c
7474

7575
return $image;
7676
}
77-
}
77+
}

0 commit comments

Comments
 (0)