cvs: pear /PECL/imagick imagick.c

From: Date: Wed, 28 Aug 2002 01:14:47 +0000
Subject: cvs: pear /PECL/imagick imagick.c
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-6021@lists.php.net to get a copy of this message
pajoye Tue Aug 27 21:14:47 2002 EDT Modified files: /pear/PECL/imagick imagick.c Log: Fix color border for imagick_border() (why set to 2 places a propery) Index: pear/PECL/imagick/imagick.c diff -u pear/PECL/imagick/imagick.c:1.7 pear/PECL/imagick/imagick.c:1.8 --- pear/PECL/imagick/imagick.c:1.7 Tue Aug 27 20:32:36 2002 +++ pear/PECL/imagick/imagick.c Tue Aug 27 21:14:47 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: imagick.c,v 1.7 2002/08/28 00:32:36 pajoye Exp $ */ +/* $Id: imagick.c,v 1.8 2002/08/28 01:14:47 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -788,7 +788,7 @@ char * color = NULL; char * color_index= NULL; char * color_len = 0; - + char * default_color; int argc = ZEND_NUM_ARGS(); RectangleInfo *rect; ExceptionInfo exception; @@ -798,13 +798,17 @@ if (zend_parse_parameters(argc TSRMLS_CC, "rll|s", &arg, &width, &height, &color,&color_len) == FAILURE) return; IMAGICK_FETCH_RES_AND_COPY_HANDLE(); - (void)QueryColorDatabase(color, &handle->info->border_color,&exception); + + if( color_len>0 ){ + (void)QueryColorDatabase(color, &handle->image->border_color,&exception); + (void)QueryColorDatabase(color, &handle->info->border_color,&exception); + } + rect = (RectangleInfo *)emalloc(sizeof(RectangleInfo)); rect->width = width; rect->height = height; rect->x = 0; rect->y = 0; - copy_handle->image = BorderImage(handle->image,rect,&exception); efree(rect); @@ -815,7 +819,7 @@ -/* {{{ proto bool imagick_border(resource handle, int width, int height, int x, int y) +/* {{{ proto bool imagick_frame(resource handle, int width, int height, int x, int y) draw a border around the image */ PHP_FUNCTION(imagick_frame)

« previous php.pear.cvs (#6021) next »