text.php 927 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. require '../../vendor/autoload.php';
  3. use Kkokk\Poster\Facades\Poster;
  4. // Poster::extension('gd')
  5. // ->buildIm(320, 320, [], true)
  6. // ->buildText('Poster', 'center', 'center', 80, [0, 0, 0, 1])
  7. // ->stream();
  8. // echo "<img style='color:#1900ff;' />";
  9. Poster::extension('imagick')
  10. ->buildImDst('C:\lang\custom\poster-doc\docs\public\favicon.png')
  11. ->getCanvas()
  12. ->borderRadius(50)
  13. ->getStream();
  14. $canvas = Poster::extension('gd')
  15. ->buildIm(320, 320, [], true)
  16. // ->buildBg(320, 320, [
  17. // 'color' => [
  18. // [7, 143, 233],
  19. // [189, 73, 164]
  20. // ],
  21. // 'to' => 'right bottom',
  22. // 'alpha' => 20
  23. // // 'radius' => 50
  24. // ], true)
  25. ->buildText('Poster', 'center', 'center', 58, [0, 0, 0, 1], '', '', 10)
  26. ->getCanvas();
  27. // $canvas->getData('C:\lang\custom\poster-doc\docs\public\image.png');
  28. $canvas->getStream();