Skip to content

Commit

Permalink
set text color as white
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuck committed Jul 7, 2017
1 parent eba5711 commit f48a001
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
// Create the image
$im = imagecreatetruecolor(150, 30);
// Create some colors
$black = imagecolorallocate($im, 255, 255, 255);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $black);
// Font path
$font = realpath(__DIR__.'/arial.ttf');
// Add the text
imagettftext($im, 20, 0, 5, 25, $black, $font, 'sample');
imagettftext($im, 20, 0, 5, 25, $white, $font, 'sample');
imagecopymerge_alpha($main, $qr, 0, 0, 0, 0, 150, 150, 100);
imagecopymerge_alpha($main, $im, 0, 150, 0, 0, 150, 30, 100);
imagepng($main);
Expand Down

0 comments on commit f48a001

Please sign in to comment.