cvs: pecl /imagick imagick.c imagick.h package.xml php_imagick.h
| From: | Michael C. Montero | Date: | Thu, 18 Sep 2003 16:02:18 +0000 |
| Subject: | cvs: pecl /imagick imagick.c imagick.h package.xml php_imagick.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-444@lists.php.net to get a copy of this message | ||
mcmontero Thu Sep 18 12:02:18 2003 EDT
Modified files:
/pecl/imagick imagick.c imagick.h package.xml php_imagick.h
Log:
Added function imagick_set_image_comment().
Index: pecl/imagick/imagick.c
diff -u pecl/imagick/imagick.c:1.45 pecl/imagick/imagick.c:1.46
--- pecl/imagick/imagick.c:1.45 Mon Aug 25 14:02:29 2003
+++ pecl/imagick/imagick.c Thu Sep 18 12:02:18 2003
@@ -16,7 +16,7 @@
| Christian Stocker (chregu@bitflux.ch) |
+----------------------------------------------------------------------+
- $Id: imagick.c,v 1.45 2003/08/25 18:02:29 mcmontero Exp $
+ $Id: imagick.c,v 1.46 2003/09/18 16:02:18 mcmontero Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -245,6 +245,14 @@
/*****
+ Set image attributes.
+
+ *****/
+
+ PHP_FE( imagick_set_image_comment, NULL ) ;
+
+ /*****
+
Clean up.
*****/
@@ -5262,6 +5270,52 @@
}
/*****************************************************************************/
+
+/******************************************************************************
+ *
+ * Set image attributes.
+ *
+ */
+
+PHP_FUNCTION( imagick_set_image_comment )
+{
+ zval* handle_id ; /* the handle identifier coming from
+ the PHP environment */
+ imagick_t* handle ; /* the actual imagick_t struct for the
+ handle */
+ char* comment ; /* the comment to set in the image */
+ int comment_len ; /* the length of the comment */
+
+ if ( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "rs",
+ &handle_id, &comment, &comment_len ) == FAILURE )
+ {
+ return ;
+ }
+
+ handle = _php_imagick_get_handle_struct_from_list( &handle_id TSRMLS_CC ) ;
+ if ( !handle )
+ {
+ php_error( E_WARNING, "%s(): handle is invalid",
+ get_active_function_name( TSRMLS_C ) ) ;
+ RETURN_FALSE ;
+ }
+
+ if ( comment_len == 0 )
+ {
+ comment = NULL ;
+ }
+
+ if ( SetImageAttribute( handle->image, "comment", ( char* )comment ) )
+ {
+ RETURN_TRUE ;
+ }
+ else
+ {
+ RETURN_FALSE ;
+ }
+}
+
+/******************************************************************************
/******************************************************************************
*
Index: pecl/imagick/imagick.h
diff -u pecl/imagick/imagick.h:1.14 pecl/imagick/imagick.h:1.15
--- pecl/imagick/imagick.h:1.14 Mon Aug 25 14:04:36 2003
+++ pecl/imagick/imagick.h Thu Sep 18 12:02:18 2003
@@ -16,7 +16,7 @@
| Christian Stocker (chregu@bitflux.ch) |
+----------------------------------------------------------------------+
- $Id: imagick.h,v 1.14 2003/08/25 18:04:36 mcmontero Exp $
+ $Id: imagick.h,v 1.15 2003/09/18 16:02:18 mcmontero Exp $
*/
#ifndef IMAGICKH
@@ -24,7 +24,7 @@
#include <magick/api.h>
- #define IMAGICK_VERSION "0.9.8"
+ #define IMAGICK_VERSION "0.9.9"
#define IMAGICK_TURN_OFF_ERRORS_TO_STDERR 1
#define IMAGICK_FILTER_UNKNOWN -1
#define IMAGICK_DEPCREATED() php_error( E_WARNING, "%s(): this function is deprecated and
will be removed soon", get_active_function_name( TSRMLS_C ) ) ;
Index: pecl/imagick/package.xml
diff -u pecl/imagick/package.xml:1.61 pecl/imagick/package.xml:1.62
--- pecl/imagick/package.xml:1.61 Wed Sep 10 16:37:12 2003
+++ pecl/imagick/package.xml Thu Sep 18 12:02:18 2003
@@ -24,6 +24,15 @@
<license>PHP License</license>
<release>
+ <version>0.9.9</version>
+ <date>2003-xx-xx</date>
+ <notes>
+- added function imagick_set_image_comment() for setting the comment attribute
+ of an image.
+ </notes>
+ <state>beta</state>
+ </release>
+ <release>
<version>0.9.8</version>
<date>2003-09-10</date>
<notes>
Index: pecl/imagick/php_imagick.h
diff -u pecl/imagick/php_imagick.h:1.26 pecl/imagick/php_imagick.h:1.27
--- pecl/imagick/php_imagick.h:1.26 Tue Apr 8 17:16:18 2003
+++ pecl/imagick/php_imagick.h Thu Sep 18 12:02:18 2003
@@ -16,7 +16,7 @@
| Christian Stocker (chregu@bitflux.ch) |
+----------------------------------------------------------------------+
- $Id: php_imagick.h,v 1.26 2003/04/08 21:16:18 mcmontero Exp $
+ $Id: php_imagick.h,v 1.27 2003/09/18 16:02:18 mcmontero Exp $
*/
#ifndef PHP_IMAGICK_H
@@ -256,6 +256,14 @@
*****/
PHP_FUNCTION( imagick_composite ) ;
+
+ /*****
+
+ Set image attributes.
+
+ *****/
+
+ PHP_FUNCTION( imagick_set_image_comment ) ;
/*****