diff --git a/reference/imagick/constants.xml b/reference/imagick/constants.xml index 022734335f..7186a4e961 100644 --- a/reference/imagick/constants.xml +++ b/reference/imagick/constants.xml @@ -1,5 +1,5 @@ - + Constants @@ -2951,7 +2951,7 @@ - + Orientation constants (available if compiled against ImageMagick 6.3.4 or later) @@ -3053,6 +3053,103 @@ + + + Orientation constants (available if compiled against ImageMagick 6.3.6 or later) + + + imagick::DISTORTION_UNDEFINED + (integer) + + + + + + + + + + + imagick::DISTORTION_AFFINE + (integer) + + + + + + + + + + + imagick::DISTORTION_AFFINEPROJECTION + (integer) + + + + + + + + + + + imagick::DISTORTION_ARC + (integer) + + + + + + + + + + + imagick::DISTORTION_BILINEAR + (integer) + + + + + + + + + + + imagick::DISTORTION_PERSPECTIVE + (integer) + + + + + + + + + + imagick::DISTORTION_PERSPECTIVEPROJECTION + (integer) + + + + + + + + + + imagick::DISTORTION_SCALEROTATETRANSLATE + (integer) + + + + + + + + diff --git a/reference/imagick/imagick.xml b/reference/imagick/imagick.xml index 109990ec48..308cd89ee5 100644 --- a/reference/imagick/imagick.xml +++ b/reference/imagick/imagick.xml @@ -1,5 +1,5 @@ - + @@ -1115,6 +1115,7 @@ &reference.imagick.imagick.mosaicimages; &reference.imagick.imagick.motionblurimage; &reference.imagick.imagick.negateimage; +&reference.imagick.imagick.distortimage; &reference.imagick.imagick.newimage; &reference.imagick.imagick.setimage; &reference.imagick.imagick.setimageopacity; diff --git a/reference/imagick/imagick/distortimage.xml b/reference/imagick/imagick/distortimage.xml new file mode 100644 index 0000000000..57e8c147bc --- /dev/null +++ b/reference/imagick/imagick/distortimage.xml @@ -0,0 +1,155 @@ + + + + + Imagick::distortImage + Distorts an image using various distortion methods + + + + &reftitle.description; + + boolImagick::distortImage + intmethod + arrayarguments + boolbestfit + + &warn.experimental.func; + + Distorts an image using various distortion methods, by mapping color lookups of the source + image to a new destination image usally of the same size as the source image, unless 'bestfit' is set to true. + + If 'bestfit' is enabled, and distortion allows it, the destination image is adjusted to ensure the whole source 'image' will just fit within the final destination image, which will be sized and offset accordingly. Also in many cases the virtual offset of the source image will be taken into account in the mapping. + + This functionality is present if Imagick is compiled against ImageMagick 6.3.6 or later. + + + + + &reftitle.parameters; + + + + method + + + The method of image distortion. See distortion constants + + + + + arguments + + + The arguments for this distortion method + + + + + bestfit + + + Attempt to resize destination to fit distorted source + + + + + + + + + &reftitle.returnvalues; + + &imagick.return.success; + + + + + &reftitle.errors; + + &imagick.imagick.throws; + + + + + + + &reftitle.examples; + + + Using <function>Imagick::distortImage</function>: + + Distort an image and write it to the disk. + + +distortImage( Imagick::DISTORTION_PERSPECTIVE, array( 7,40, 4,30, 4,124, 4,123, 85,122, 100,123, 85,2, 100,30 ), true ); + +$im->writeImage( "example_out.jpg" ); + +?> +]]> + + + + + + + &reftitle.seealso; + + + Imagick::blurImage + Imagick::motionBlurImage + Imagick::radialBlurImage + + + + + + +