Thursday, November 20, 2025
HomeLanguagesPHP | Imagick blueShiftImage() Function

PHP | Imagick blueShiftImage() Function

The Imagick::blueShiftImage() function is an inbuilt function in PHP which is used to mute the colors of the image to simulate a scene at nighttime in the moonlight.

Syntax:

bool Imagick::blueShiftImage( $factor)

Parameters: This function accept a single parameter $factor which is used to specify the mutes colors of image.

Return Value: This function returns True on success.

Below programs illustrate the Imagick::blueShiftImage() function in PHP:

Program 1:
Original Image:
https://geeksforgeeks.org/wp-content/uploads/2023/10/neveropen-21-36.png




<?php
  
// Create new imagick object
$imagick = new Imagick(
  
  
// Using blueShiftImage function
$imagick->blueShiftImage(1.3);
  
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
  
?>


Output:

Program 2:
Original Image:
https://geeksforgeeks.org/wp-content/uploads/2023/10/gfg_200X200.png




<?php
  
// Create new imagick object
$imagick = new Imagick(
  
// Using blueShiftImage function
$imagick->blueShiftImage(2.5);
  
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
  
?>


Output:

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

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32405 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6777 POSTS0 COMMENTS
Nicole Veronica
11925 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11995 POSTS0 COMMENTS
Shaida Kate Naidoo
6905 POSTS0 COMMENTS
Ted Musemwa
7162 POSTS0 COMMENTS
Thapelo Manthata
6861 POSTS0 COMMENTS
Umr Jansen
6846 POSTS0 COMMENTS