Skip to content

Commit

Permalink
Merge pull request endroid#177 from mh1988/bug_alpha
Browse files Browse the repository at this point in the history
Save alpha
  • Loading branch information
endroid authored Oct 24, 2018
2 parents bff7b8c + c3f10ad commit c6088c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Writer/PngWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function createInterpolatedImage($baseImage, array $data, QrCodeInterfac
$backgroundColor = imagecolorallocatealpha($image, $qrCode->getBackgroundColor()['r'], $qrCode->getBackgroundColor()['g'], $qrCode->getBackgroundColor()['b'], $qrCode->getBackgroundColor()['a']);
imagefill($image, 0, 0, $backgroundColor);
imagecopyresampled($image, $baseImage, $data['margin_left'], $data['margin_left'], 0, 0, $data['inner_width'], $data['inner_height'], imagesx($baseImage), imagesy($baseImage));

imagesavealpha($image, true);
return $image;
}

Expand Down

0 comments on commit c6088c4

Please sign in to comment.