cvs: pecl /imagick imagick.c package.xml php_imagick.h

From: Date: Mon, 08 Mar 2004 16:12:13 +0000
Subject: cvs: pecl /imagick imagick.c package.xml php_imagick.h
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-1018@lists.php.net to get a copy of this message
mcmontero Mon Mar 8 11:12:13 2004 EDT Modified files: /pecl/imagick imagick.c package.xml php_imagick.h Log: - added imagick_set_image_quality() for manipulating the quality of the resultant image. THIS FUNCTION IS NOT YET TESTED. SENDING OFF TO SOMEONE TO TEST NOW. http://cvs.php.net/diff.php/pecl/imagick/imagick.c?r1=1.51&r2=1.52&ty=u Index: pecl/imagick/imagick.c diff -u pecl/imagick/imagick.c:1.51 pecl/imagick/imagick.c:1.52 --- pecl/imagick/imagick.c:1.51 Wed Mar 3 15:39:05 2004 +++ pecl/imagick/imagick.c Mon Mar 8 11:12:13 2004 @@ -16,7 +16,7 @@ | Christian Stocker (chregu@bitflux.ch) | +----------------------------------------------------------------------+ - $Id: imagick.c,v 1.51 2004/03/03 20:39:05 mcmontero Exp $ + $Id: imagick.c,v 1.52 2004/03/08 16:12:13 mcmontero Exp $ */ #ifdef HAVE_CONFIG_H @@ -251,6 +251,7 @@ *****/ PHP_FE( imagick_set_image_comment, NULL ) + PHP_FE( imagick_set_image_quality, NULL ) /***** @@ -5364,6 +5365,34 @@ } } +PHP_FUNCTION( imagick_set_image_quality ) +{ + zval* handle_id ; /* the handle identifier coming from + the PHP environment */ + imagick_t* handle ; /* the actual imagick_t struct for the + handle */ + long quality ; /* the new value for the quality of + the image. 100 means maintain 100% + of the original quality. */ + + if ( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "rl", + &handle_id, &quality ) == 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 ; + } + + handle->image_info->quality = quality ; + RETURN_TRUE ; +} + /****************************************************************************** /****************************************************************************** http://cvs.php.net/diff.php/pecl/imagick/package.xml?r1=1.65&r2=1.66&ty=u Index: pecl/imagick/package.xml diff -u pecl/imagick/package.xml:1.65 pecl/imagick/package.xml:1.66 --- pecl/imagick/package.xml:1.65 Wed Mar 3 15:39:06 2004 +++ pecl/imagick/package.xml Mon Mar 8 11:12:13 2004 @@ -37,6 +37,8 @@ less restrictive. This apparently helps fix issues with certain types of images that otherwise appear corrupt. Thanks to Hien Duy Nguyenxi <hdn@umich.edu> for finding this, recommending the change and testing it. +- added imagick_set_image_quality() for manipulating the quality of the + resultant image. </notes> <state>beta</state> </release> http://cvs.php.net/diff.php/pecl/imagick/php_imagick.h?r1=1.28&r2=1.29&ty=u Index: pecl/imagick/php_imagick.h diff -u pecl/imagick/php_imagick.h:1.28 pecl/imagick/php_imagick.h:1.29 --- pecl/imagick/php_imagick.h:1.28 Mon Jan 5 17:01:35 2004 +++ pecl/imagick/php_imagick.h Mon Mar 8 11:12:13 2004 @@ -16,7 +16,7 @@ | Christian Stocker (chregu@bitflux.ch) | +----------------------------------------------------------------------+ - $Id: php_imagick.h,v 1.28 2004/01/05 22:01:35 mcmontero Exp $ + $Id: php_imagick.h,v 1.29 2004/03/08 16:12:13 mcmontero Exp $ */ #ifndef PHP_IMAGICK_H @@ -265,6 +265,7 @@ *****/ PHP_FUNCTION( imagick_set_image_comment ) ; + PHP_FUNCTION( imagick_set_image_quality ) ; /*****

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