SHARE
TWEET

Untitled

a guest May 5th, 2011 185 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.   function draw()
  4.   {
  5.      $r = "00";
  6.      $v = "0";
  7.      $im = new Imagick("imgs/logo.svg.png");
  8.      $shad = $im->clone();
  9.      $shad->setImageBackgroundColor(new ImagickPixel( "black" ));
  10.      $shad->shadowImage( 80, 1, 3, 3 );
  11.      $shad->compositeImage( $im, Imagick::COMPOSITE_OVER, 0, 0 );
  12.      $shad->newPseudoImage(51, 27, "null:");
  13.      $im = $shad->montageImage(new ImagickDraw(), "2x1", "51x27+0+0", imagick::MONTAGEMODE_UNFRAME, "0");
  14.      $shad->destroy();
  15.      $imtmp = new Imagick("imgs/00.gif");
  16.      $im->addImage($imtmp);
  17.      $imtmp->destroy();
  18.      $im = $im->montageImage(new ImagickDraw(), "1x2", "", imagick::MONTAGEMODE_CONCATENATE, "0");
  19.      $draw = new ImagickDraw();
  20.      $draw->setFont("/usr/share/fonts/corefonts/impact.ttf");
  21.      $draw->setFillColor('#A58600');
  22.      $draw->setFontSize(15.5);
  23.      $draw->setGravity(Imagick::GRAVITY_NORTHEAST);
  24.      $text=$r;
  25.      $im->annotateImage($draw, 26, 0, 0, $text);
  26.      $draw->setFillColor('#CCC');
  27.      $text="/12";
  28.      $im->annotateImage($draw, 2, 0, 0, $text);
  29.      $draw->setFont("helvetica");
  30.      $draw->setFillColor('#136CB2');
  31.      $draw->setFontSize(11);
  32.      $text= "(" . $v . ")";
  33.      $im->annotateImage($draw, 2, 17, 0, $text);
  34.      $draw->destroy();
  35.      $im->setImageFormat( "png") ;
  36.      $im->destroy();
  37.   }
  38.  
  39. for ($i = 10; $i <= 30; $i++)
  40. {
  41.   draw();
  42. }
  43. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top