]>
Raphaël G. Git Repositories - packbundle/blob - public/facebook/source.php
   1 <?php 
declare(strict_types
=1); 
   4  * This file is part of the Rapsys PackBundle package. 
   6  * (c) Raphaël Gertz <symfony@rapsys.eu> 
   8  * For the full copyright and license information, please view the LICENSE 
   9  * file that was distributed with this source code. 
  13 $image = new Imagick(); 
  16 $draw = new ImagickDraw(); 
  19 $pixel = new ImagickPixel('white'); 
  22 $image->newImage(1200, 630, $pixel); 
  25 $draw->setFillColor('black'); 
  28 $draw->setFont('../woff2/droidsans.regular.woff2'); 
  29 $draw->setFontSize(30); 
  32 $image->annotateImage($draw, 10, 35, 0, 'RP'); 
  33 $image->annotateImage($draw, 10, 615, 0, 'RP'); 
  34 $image->annotateImage($draw, 1155, 35, 0, 'RP'); 
  35 $image->annotateImage($draw, 1155, 615, 0, 'RP'); 
  38 $image->setImageFormat('png'); 
  41 header('Content-type: image/png');