您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

23 行
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. ?>