Open In App

PHP | Imagick swirlImage() Function

Last Updated : 27 Sep, 2019
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

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 



Next Article

Similar Reads

three90RightbarBannerImg