Changeset 3122 for libcaca/trunk/caca-php/examples
- Timestamp:
- Oct 27, 2008, 8:14:32 PM (14 years ago)
- Location:
- libcaca/trunk/caca-php/examples
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/examples/dithering.php
r3120 r3122 2 2 <? 3 3 $img = imagecreatefrompng(dirname(__FILE__)."/logo-caca.png"); 4 //$img = imagecreatefromjpeg("/home/nicolas/images/Clown Fish-mini.jpg");5 4 $canvas = caca_create_canvas(0, 0); 6 5 7 $dither = caca_create_dither(16, 128, 128, 3 * 256, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000); 8 caca_set_dither_gamma($dither, -1.0); 6 $dither = caca_create_dither(32, 128, 128, 4 * 128, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000); 9 7 10 if (caca_dither_bitmap_gd($canvas, 0, 0, 30, 30, $dither, $img)) { 11 $dp = caca_create_display($canvas); 12 caca_refresh_display($dp); 13 sleep(5); 14 } 8 $display = caca_create_display($canvas); 9 caca_set_display_time($display, 80000); 15 10 11 caca_dither_bitmap_gd($canvas, 0, 0, caca_get_canvas_width($canvas), caca_get_canvas_height($canvas), $dither, $img); 12 caca_refresh_display($display); 13 14 sleep(5); 15 16 17 18
Note: See TracChangeset
for help on using the changeset viewer.