Example #1
0
/*
@description	Sets the color count of the pixel wand.
@param			count	The number of colors required
*/
void nMagick_pixel_set_color_count( value pixel, value count )
{
	PixelWand *pix;

	val_check_kind( pixel, k_pixel );
	val_check( count, int );

	pix = PIXEL( pixel );

	PixelSetColorCount( pix, val_int( count ) );
}
Example #2
0
/* {{{ proto int ImagickPixel::setColorCount(int colorCount)
	Sets the color count associated with this color.
*/
PHP_METHOD(imagickpixel, setcolorcount)
{
    php_imagickpixel_object *internp;
    im_long color_count;

    /* Parse parameters given to function */
    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &color_count) == FAILURE) {
        return;
    }

    internp = Z_IMAGICKPIXEL_P(getThis());

    PixelSetColorCount(internp->pixel_wand, color_count);
    RETVAL_TRUE;
}
/* {{{ proto GmagickPixel GmagickPixel::setColorCount(int colorCount)
    Sets the color count associated with this color.
*/
PHP_METHOD(gmagickpixel, setcolorcount)
{
	php_gmagickpixel_object *internp;
	zend_long color_count;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &color_count) == FAILURE) {
		return;
	}

	internp = Z_GMAGICKPIXEL_OBJ_P(getThis());

	PixelSetColorCount(internp->pixel_wand, color_count);

	GMAGICK_CHAIN_METHOD;
}