Thursday, July 30, 2026
HomeLanguagesPHP | Imagick rotationalBlurImage() Function

PHP | Imagick rotationalBlurImage() Function

The Imagick::rotationalBlurImage() function is an inbuilt function in PHP that is used to apply the blur over an image by a certain angle. 

Syntax:

bool Imagick::rotationalBlurImage( $angle, $channel )

Parameters: This function accepts two parameters as mentioned above and described below:

  • $angle: This parameter is used to store the value of the angle.
  • $channel: This parameter provides the channel constant that is valid for channel mode. More than one channel can be combined using a bitwise operator. The default channel in the Imagick function is Imagick::CHANNEL_DEFAULT.

Return Value: This function returns True on success. Below programs illustrate the Imagick::rotationalBlurImage() function in PHP: 

Original Image: 

Program 1: 

php




<?php
 
// Create new Imagick Object
$imagick = new Imagick(
 
// Use rotationalBlurImage function
$imagick->rotationalBlurImage(1);
$imagick->rotationalBlurImage(7);
$imagick->rotationalBlurImage(3);
 
// Set Image Header
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
?>


Output: 

Program 2: 

php




<?php
 
// require_once('path/vendor/autoload.php');
 
// Create new Imagick Object
$imagick = new Imagick('
https://media.geeksforgeeks.org/wp-content/uploads/neveropen-19.png');
 
// Use rotationalBlurImage function
$imagick->rotationalBlurImage(6, 4);
 
// Set header image
header("Content-Type: image/jpg");
 
echo $imagick->getImageBlob();
?>


Output: 

rotationalImage1

Reference: http://php.net/manual/en/imagick.rotationalblurimage.php

RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32520 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6903 POSTS0 COMMENTS
Nicole Veronica
12017 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12115 POSTS0 COMMENTS
Shaida Kate Naidoo
7023 POSTS0 COMMENTS
Ted Musemwa
7265 POSTS0 COMMENTS
Thapelo Manthata
6981 POSTS0 COMMENTS
Umr Jansen
6973 POSTS0 COMMENTS