diff --git a/caca-php/examples/dithering.php b/caca-php/examples/dithering.php index bb67827..dc9eb2c 100755 --- a/caca-php/examples/dithering.php +++ b/caca-php/examples/dithering.php @@ -1,12 +1,14 @@ #!/usr/bin/php5 trueColor) { + RETURN_FALSE; + } + caca_dither_t *dither = caca_create_dither(sizeof(int) * 8, img->sx, img->sy, img->sx * sizeof(int), 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000); + ZEND_REGISTER_RESOURCE(return_value, dither, le_caca_dither); +} + PHP_FUNCTION(caca_set_dither_palette) { } diff --git a/caca-php/php_caca.h b/caca-php/php_caca.h index 626fd78..fedcf1f 100644 --- a/caca-php/php_caca.h +++ b/caca-php/php_caca.h @@ -105,6 +105,7 @@ PHP_FUNCTION(caca_set_frame_name); PHP_FUNCTION(caca_create_frame); PHP_FUNCTION(caca_free_frame); PHP_FUNCTION(caca_create_dither); +PHP_FUNCTION(caca_create_dither_gd); PHP_FUNCTION(caca_set_dither_palette); PHP_FUNCTION(caca_set_dither_brightness); PHP_FUNCTION(caca_get_dither_brightness);