mirror of
https://github.com/Imagick/imagick.git
synced 2026-06-19 07:35:36 +00:00
Merge commit '54cdfe9d7aa58b819b203e235d39153d8e10b185'
* commit '54cdfe9d7aa58b819b203e235d39153d8e10b185': add check for MagickSetImageInterpolateMethod Fix FFT tests.
This commit is contained in:
@@ -51,6 +51,14 @@ IM_FIND_IMAGEMAGICK([6.2.4], [$PHP_IMAGICK])
|
||||
PHP_EVAL_LIBLINE($IM_IMAGEMAGICK_LIBS, IMAGICK_SHARED_LIBADD)
|
||||
PHP_EVAL_INCLINE($IM_IMAGEMAGICK_CFLAGS)
|
||||
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS $IM_IMAGEMAGICK_LIBS"
|
||||
|
||||
PHP_CHECK_FUNC(MagickGetVersion)
|
||||
PHP_CHECK_FUNC(MagickSetImageInterpolateMethod)
|
||||
|
||||
LDFLAGS=$old_LDFLAGS
|
||||
|
||||
PHP_SUBST(IMAGICK_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_IMAGICK,1,[ ])
|
||||
PHP_NEW_EXTENSION(imagick, imagick_file.c imagick_class.c imagickdraw_class.c imagickpixel_class.c imagickpixeliterator_class.c imagick_helpers.c imagick.c imagickkernel_class.c shim_im6_to_im7.c, $ext_shared,, $IM_IMAGEMAGICK_CFLAGS)
|
||||
|
||||
@@ -2287,7 +2287,9 @@ static zend_function_entry php_imagick_class_methods[] =
|
||||
PHP_ME(imagick, setimageproperty, imagick_setimageproperty_args, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(imagick, deleteimageproperty, imagick_deleteimageproperty_args, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(imagick, identifyformat, imagick_identifyformat_args, ZEND_ACC_PUBLIC)
|
||||
#ifdef HAVE_MAGICKSETIMAGEINTERPOLATEMETHOD
|
||||
PHP_ME(imagick, setimageinterpolatemethod, imagick_setimageinterpolatemethod_args, ZEND_ACC_PUBLIC)
|
||||
#endif // #ifdef HAVE_MAGICKSETIMAGEINTERPOLATEMETHOD
|
||||
PHP_ME(imagick, getimageinterpolatemethod, imagick_zero_args, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(imagick, linearstretchimage, imagick_linearstretchimage_args, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(imagick, getimagelength, imagick_zero_args, ZEND_ACC_PUBLIC)
|
||||
|
||||
@@ -1043,6 +1043,7 @@ PHP_METHOD(imagick, getimageinterpolatemethod)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef HAVE_MAGICKSETIMAGEINTERPOLATEMETHOD
|
||||
/* {{{ proto bool Imagick::setImageInterpolateMethod(int method)
|
||||
Sets the image interpolate pixel method.
|
||||
*/
|
||||
@@ -1071,6 +1072,7 @@ PHP_METHOD(imagick, setimageinterpolatemethod)
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
#endif // #ifdef HAVE_MAGICKSETIMAGEINTERPOLATEMETHOD
|
||||
|
||||
/* {{{ proto bool Imagick::linearStretchImage(float blackPoint, float whitePoint)
|
||||
Stretches with saturation the image intensity.
|
||||
|
||||
@@ -438,7 +438,9 @@ PHP_METHOD(imagick, getimageproperty);
|
||||
PHP_METHOD(imagick, setimageproperty);
|
||||
PHP_METHOD(imagick, deleteimageproperty);
|
||||
PHP_METHOD(imagick, identifyformat);
|
||||
#ifdef HAVE_MAGICKSETIMAGEINTERPOLATEMETHOD
|
||||
PHP_METHOD(imagick, setimageinterpolatemethod);
|
||||
#endif // #ifdef HAVE_MAGICKSETIMAGEINTERPOLATEMETHOD
|
||||
PHP_METHOD(imagick, getimageinterpolatemethod);
|
||||
PHP_METHOD(imagick, linearstretchimage);
|
||||
PHP_METHOD(imagick, getimagelength);
|
||||
|
||||
@@ -42,10 +42,10 @@ function forwardFourierTransformImage() {
|
||||
$mask = createMask();
|
||||
$imagick->forwardFourierTransformImage(true);
|
||||
|
||||
@$imagick->setimageindex(0);
|
||||
$imagick->setIteratorIndex(0);
|
||||
$magnitude = $imagick->getimage();
|
||||
|
||||
@$imagick->setimageindex(1);
|
||||
$imagick->setIteratorIndex(1);
|
||||
$imagickPhase = $imagick->getimage();
|
||||
|
||||
if (true) {
|
||||
|
||||
@@ -39,10 +39,10 @@ function forwardFourierTransformImage() {
|
||||
$mask = createMask();
|
||||
$imagick->forwardFourierTransformImage(true);
|
||||
|
||||
@$imagick->setimageindex(0);
|
||||
$imagick->setIteratorIndex(0);
|
||||
$magnitude = $imagick->getimage();
|
||||
|
||||
@$imagick->setimageindex(1);
|
||||
$imagick->setIteratorIndex(1);
|
||||
$imagickPhase = $imagick->getimage();
|
||||
|
||||
if (true) {
|
||||
|
||||
@@ -24,9 +24,15 @@ $draw->setFontSize(72);
|
||||
|
||||
$opacityToSet = 0.1;
|
||||
|
||||
$density = $draw->getDensity();
|
||||
$densitySet = "200";
|
||||
|
||||
// What to test for density?
|
||||
|
||||
$draw->setDensity($densitySet);
|
||||
$densityGet = $draw->getDensity();
|
||||
|
||||
if (strcmp($densitySet, $densityGet) !== 0) {
|
||||
echo "Density retrieved [$densityGet] is not the value set [$densitySet].";
|
||||
}
|
||||
|
||||
$draw->line(125, 70, 100, 50);
|
||||
$draw->line(350, 170, 100, 150);
|
||||
@@ -36,13 +42,9 @@ $imagick->newImage(500, 500, $backgroundColor);
|
||||
$imagick->setImageFormat("png");
|
||||
$imagick->drawImage($draw);
|
||||
|
||||
|
||||
|
||||
|
||||
$bytes = $imagick->getImageBlob();
|
||||
if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
|
||||
|
||||
echo "This test is not working yet.";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Ok
|
||||
Reference in New Issue
Block a user