You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 line
610 B

  1. #!/usr/bin/php5
  2. <?php
  3. $img = imagecreatefrompng(dirname(__FILE__)."/logo-caca.png");
  4. //$img = imagecreatefromgif(dirname(__FILE__)."/logo-caca-idx.gif");
  5. if (!$img)
  6. die("Can not open image.\n");
  7. $dither = caca_create_dither($img);
  8. if (!$dither)
  9. die("Can not create dither. Maybe this image is not truecolor.\n");
  10. $canvas = caca_create_canvas(0, 0);
  11. $display = caca_create_display($canvas);
  12. if (!$display)
  13. die("Can not create display.\n");
  14. caca_dither_bitmap($canvas, 0, 0, caca_get_canvas_width($canvas), caca_get_canvas_height($canvas), $dither, $img);
  15. caca_refresh_display($display);
  16. sleep(5);
  17. ?>