Skip to content
Related Articles
Open in App
Not now

Related Articles

PHP | Imagick swirlImage() Function

Improve Article
Save Article
  • Last Updated : 27 Sep, 2019
Improve Article
Save Article

The Imagick::swirlImage() function is an inbuilt function in PHP which is used to swirl the pixels about the center of the image. The degree indicates the sweep of the arc to move each pixel.

Syntax:

bool Imagick::swirlImage( float $degrees )

Parameters: This function accepts single parameter $degrees which defines the tightness of the swirling effect.

Return Value: This function returns TRUE on success.

Exceptions: This function throws ImagickException on error.

Below program illustrates the Imagick::swirlImage() function in PHP:

Program:




<?php 
    
// Create a Imagick object 
$imagick = new Imagick(
    
// Swirl the image
$imagick->swirlImage(350); 
  
header('Content-type: image/png'); 
    
// Display the output image 
echo $imagick
  
?> 

Output:

Reference: https://www.php.net/manual/en/imagick.swirlimage.php 

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!