[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] =?utf-8?q?svn:_/pecl/gmagick/trunk/_README_gmagick.c_gmagick=5Fmethods.c_package.xml_php=
From: Vito_Chin <vito () php ! net>
Date: 2012-12-27 8:29:15
Message-ID: svn-vito-1356596955-328903-1784916823 () svn ! php ! net
[Download RAW message or body]
vito Thu, 27 Dec 2012 08:29:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=328903
Log:
Added coalesceImages, sharpenImage. Ready for release 1.1.2RC1
Changed paths:
U pecl/gmagick/trunk/README
U pecl/gmagick/trunk/gmagick.c
U pecl/gmagick/trunk/gmagick_methods.c
U pecl/gmagick/trunk/package.xml
U pecl/gmagick/trunk/php_gmagick.h
["svn-diffs-328903.txt" (text/x-diff)]
Modified: pecl/gmagick/trunk/README
===================================================================
--- pecl/gmagick/trunk/README 2012-12-27 07:53:59 UTC (rev 328902)
+++ pecl/gmagick/trunk/README 2012-12-27 08:29:15 UTC (rev 328903)
@@ -1,12 +1,2 @@
Gmagick
-Copyright (c) 2009 Vito Chin, Mikko Koppanen
-
-Notes:
- setstrokecolor
- 1. Can also take in a string describing the color instead of a pixel object.
- annotate
- 1. Gmagick does not require font to be set and will not throw an exception
- if font not set. Uses default font instead.
- blurimage
- 1. Is not channel specific.
-
+Copyright (c) 2009 Vito Chin, Mikko Koppanen
\ No newline at end of file
Modified: pecl/gmagick/trunk/gmagick.c
===================================================================
--- pecl/gmagick/trunk/gmagick.c 2012-12-27 07:53:59 UTC (rev 328902)
+++ pecl/gmagick/trunk/gmagick.c 2012-12-27 08:29:15 UTC (rev 328903)
@@ -320,6 +320,8 @@
ZEND_ARG_INFO(0, y)
ZEND_END_ARG_INFO()
+
+
ZEND_BEGIN_ARG_INFO_EX(gmagick_commentimage_args, 0, 0, 1)
ZEND_ARG_INFO(0, comment)
ZEND_END_ARG_INFO()
@@ -696,6 +698,12 @@
ZEND_ARG_INFO(0, CHANNEL)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(gmagick_sharpenimage_args, 0, 0, 2)
+ ZEND_ARG_INFO(0, radius)
+ ZEND_ARG_INFO(0, sigma)
+ ZEND_ARG_INFO(0, CHANNEL)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO_EX(gmagick_shearimage_args, 0, 0, 3)
ZEND_ARG_INFO(0, color)
ZEND_ARG_INFO(0, xShear)
@@ -761,6 +769,7 @@
PHP_ME(gmagick, thumbnailimage, gmagick_thumbnailimage_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, clear, gmagick_empty_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, cropimage, gmagick_cropimage_args, ZEND_ACC_PUBLIC)
+ PHP_ME(gmagick, coalesceimages, gmagick_empty_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, compositeimage, gmagick_compositeimage_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, drawimage, gmagick_drawimage_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, annotateimage, gmagick_annotateimage_args, ZEND_ACC_PUBLIC)
@@ -807,7 +816,7 @@
PHP_ME(gmagick, getimagecompose, gmagick_empty_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, getimagedelay, gmagick_empty_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, getimagedepth, gmagick_empty_args, ZEND_ACC_PUBLIC)
- PHP_ME(gmagick, getnumberimages, gmagick_empty_args, ZEND_ACC_PUBLIC)
+ PHP_ME(gmagick, getnumberimages, gmagick_empty_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, setimagecompose, gmagick_setimagecompose_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, setimagedelay, gmagick_setimagedelay_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, setimagedepth, gmagick_setimagedepth_args, ZEND_ACC_PUBLIC)
@@ -903,6 +912,7 @@
PHP_ME(gmagick, rotateimage, gmagick_rotateimage_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, scaleimage, gmagick_scaleimage_args, ZEND_ACC_PUBLIC)
PHP_ME(gmagick, separateimagechannel, gmagick_separateimagechannel_args, \
ZEND_ACC_PUBLIC) + PHP_ME(gmagick, sharpenimage, gmagick_sharpenimage_args, \
ZEND_ACC_PUBLIC) PHP_ME(gmagick, shearimage, gmagick_shearimage_args, \
ZEND_ACC_PUBLIC) PHP_ME(gmagick, solarizeimage, gmagick_solarizeimage_args, \
ZEND_ACC_PUBLIC) PHP_ME(gmagick, spreadimage, gmagick_spreadimage_args, \
ZEND_ACC_PUBLIC)
Modified: pecl/gmagick/trunk/gmagick_methods.c
===================================================================
--- pecl/gmagick/trunk/gmagick_methods.c 2012-12-27 07:53:59 UTC (rev 328902)
+++ pecl/gmagick/trunk/gmagick_methods.c 2012-12-27 08:29:15 UTC (rev 328903)
@@ -346,6 +346,38 @@
}
/* }}} */
+/* {{{ proto Gmagick Gmagick::coalesceImages()
+ Composites a set of images while respecting any page offsets and disposal \
methods. + GIF, MIFF, and MNG animation sequences typically start with an image \
background and + each subsequent image varies in size and offset. returns a new \
sequence where each image in the + sequence is the same size as the first and \
composited with the next image in the sequence. +*/
+PHP_METHOD(gmagick, coalesceimages)
+{
+ MagickWand *tmp_wand;
+ php_gmagick_object *intern, *intern_return;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+ return;
+ }
+
+ intern = (php_gmagick_object *)zend_object_store_get_object(getThis() \
TSRMLS_CC); + GMAGICK_CHECK_NOT_EMPTY(intern->magick_wand, 1, 1);
+
+ tmp_wand = MagickCoalesceImages(intern->magick_wand);
+
+ if (tmp_wand == (MagickWand *)NULL) {
+ GMAGICK_THROW_GMAGICK_EXCEPTION(intern->magick_wand, "Coalesce image \
failed"); + }
+
+ object_init_ex(return_value, php_gmagick_sc_entry);
+ intern_return = (php_gmagick_object *)zend_object_store_get_object(return_value \
TSRMLS_CC); + GMAGICK_REPLACE_MAGICKWAND(intern_return, tmp_wand);
+ return;
+
+}
+/* }}} */
+
/* {{{ proto Gmagick Gmagick::composite(Gmagick source, int compose, int x, int y)
Crops image
*/
@@ -3980,6 +4012,34 @@
}
/* }}} */
+/* {{{ proto bool Imagick::sharpenImage(float radius, float sigma[, int channel])
+ Sharpens an image. We convolve the image with a Gaussian operator of the given \
radius and standard deviation (sigma). For reasonable results, the radius should be \
larger than sigma. Use a radius of 0 and selects a suitable radius for you. +*/
+PHP_METHOD(gmagick, sharpenimage)
+{
+ double sigma, radius;
+ MagickBool status;
+ php_gmagick_object *intern;
+ long channel = DefaultChannels;
+
+ /* Parse parameters given to function */
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &radius, &sigma) == \
FAILURE) { + return;
+ }
+
+ intern = (php_gmagick_object *)zend_object_store_get_object(getThis() \
TSRMLS_CC); + GMAGICK_CHECK_NOT_EMPTY(intern->magick_wand, 1, 1);
+
+ status = MagickSharpenImage(intern->magick_wand, radius, sigma);
+
+ /* No magick is going to happen */
+ if (status == MagickFalse) {
+ GMAGICK_THROW_GMAGICK_EXCEPTION(intern->magick_wand, "Unable to sharpen \
image"); + }
+ GMAGICK_CHAIN_METHOD;
+}
+/* }}} */
+
/* {{{ proto bool Gmagick::shearImage(GmagickPixel background, float x_shear, float \
y_shear) Slides one edge of an image along the X or Y axis
*/
Modified: pecl/gmagick/trunk/package.xml
===================================================================
--- pecl/gmagick/trunk/package.xml 2012-12-27 07:53:59 UTC (rev 328902)
+++ pecl/gmagick/trunk/package.xml 2012-12-27 08:29:15 UTC (rev 328903)
@@ -19,7 +19,7 @@
<email>mkoppanen@php.net</email>
<active>yes</active>
</lead>
- <date>2012-12-08</date>
+ <date>2012-12-27</date>
<version>
<release>1.1.2RC1</release>
<api>1.1.2RC1</api>
@@ -30,7 +30,20 @@
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
-GraphicsMagick backward-compatibility changes related to setCompressionQuality.
+1. Version number updated.
+
+2. levelImage() will now choose between MagickLevelImage and MagickLevelImageChannel \
depending on whether the channel is provided (the former if it isn't). To adjust the \
levels of an image by scaling the colours falling between specified white and black \
points to the full available quantum range, leave out the channel or use \
Gmagick::CHANNEL_DEFAULT. The range of applicable channels for this method can be \
seen here: +
+http://www.graphicsmagick.org/wand/magick_wand.html#magicklevelimagechannel
+
+Constants available here:
+
+http://www.php.net/manual/en/gmagick.constants.php
+Method interface is preserved.
+
+3. coalesceImage() method added.
+
+4. sharpenImage() method added.
</notes>
<contents>
<dir name="/">
Modified: pecl/gmagick/trunk/php_gmagick.h
===================================================================
--- pecl/gmagick/trunk/php_gmagick.h 2012-12-27 07:53:59 UTC (rev 328902)
+++ pecl/gmagick/trunk/php_gmagick.h 2012-12-27 08:29:15 UTC (rev 328903)
@@ -135,6 +135,7 @@
PHP_METHOD(gmagick, thresholdimage);
PHP_METHOD(gmagick, charcoalimage);
PHP_METHOD(gmagick, chopimage);
+PHP_METHOD(gmagick, coalesceimages);
PHP_METHOD(gmagick, commentimage);
PHP_METHOD(gmagick, current);
PHP_METHOD(gmagick, cyclecolormapimage);
@@ -266,6 +267,7 @@
PHP_METHOD(gmagick, rotateimage);
PHP_METHOD(gmagick, scaleimage);
PHP_METHOD(gmagick, separateimagechannel);
+PHP_METHOD(gmagick, sharpenimage);
PHP_METHOD(gmagick, shearimage);
PHP_METHOD(gmagick, solarizeimage);
PHP_METHOD(gmagick, spreadimage);
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic