cvs: pecl /imagick imagick.c package.xml

From: Date: Thu, 17 Jul 2003 18:04:05 +0000
Subject: cvs: pecl /imagick imagick.c package.xml
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-370@lists.php.net to get a copy of this message
mcmontero Thu Jul 17 14:04:05 2003 EDT Modified files: /pecl/imagick imagick.c package.xml Log: - fixed to work with versions of ImageMagick >= 5.5.7 - special thanks to James Huston (hustonjs@itadevelopment.com) for helping make this happen. - test compiled against 5.5.3, 5.5.6 and 5.5.7 with success. Index: pecl/imagick/imagick.c diff -u pecl/imagick/imagick.c:1.43 pecl/imagick/imagick.c:1.44 --- pecl/imagick/imagick.c:1.43 Thu Jul 17 13:44:40 2003 +++ pecl/imagick/imagick.c Thu Jul 17 14:04:05 2003 @@ -16,7 +16,7 @@ | Christian Stocker (chregu@bitflux.ch) | +----------------------------------------------------------------------+ - $Id: imagick.c,v 1.43 2003/07/17 17:44:40 mcmontero Exp $ + $Id: imagick.c,v 1.44 2003/07/17 18:04:05 mcmontero Exp $ */ #ifdef HAVE_CONFIG_H @@ -2454,17 +2454,31 @@ if ( handle->draw_info && handle->image && !handle->draw_context ) { +#if MagickLibVersion < 0x557 handle->draw_context = DrawAllocateContext( handle->draw_info, handle->image ) ; +#else + handle->draw_context = DrawAllocateWand( handle->draw_info, + handle->image ) ; +#endif + if ( !handle->draw_context ) { +#if MagickLibVersion < 0x557 php_error( E_ERROR, "%s(): DrawAllocateContext() did not properly allocate DrawContext structure", get_active_function_name( TSRMLS_C ) ) ; +#else + php_error( E_ERROR, "%s(): DrawAllocateWand() did not properly allocate DrawContext structure", get_active_function_name( TSRMLS_C ) ) ; +#endif RETURN_FALSE ; } } else { +#if MagickLibVersion < 0x557 php_error( E_WARNING, "%s(): attempt to create draw_context with DrawAllocateContext() and empty draw_info or image", get_active_function_name( TSRMLS_C ) ) ; +#else + php_error( E_WARNING, "%s(): attempt to create draw_context withDrawAllocateWand() and empty draw_info or image", get_active_function_name( TSRMLS_C ) ) ; +#endif } RETURN_TRUE ; @@ -5380,7 +5394,11 @@ if ( handle->draw_context ) { +#if MagickLibVersion < 0x557 DrawDestroyContext( handle->draw_context ) ; +#else + DestroyDrawingWand( handle->draw_context ) ; +#endif } efree( handle ) ; Index: pecl/imagick/package.xml diff -u pecl/imagick/package.xml:1.56 pecl/imagick/package.xml:1.57 --- pecl/imagick/package.xml:1.56 Thu Jul 17 13:44:40 2003 +++ pecl/imagick/package.xml Thu Jul 17 14:04:05 2003 @@ -28,6 +28,9 @@ <notes> - fixed bug in imagick_free() that would cause it to SEGFAULT everytime it's called. +- fixed to work with versions of ImageMagick >= 5.5.7 - special thanks to + James Huston (hustonjs@itadevelopment.com) for helping make this happen. +- test compiled against 5.5.3, 5.5.6 and 5.5.7 with success. </notes> <state>beta</state> </release>

« previous php.pecl.cvs (#370) next »