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

PHP | Imagick vignetteImage() Function

The Imagick::vignetteImage() function is an inbuilt function in PHP which is used to add a vintage filter to the image. This function illustrates or portrait an image which fades into its background without a definite border.

Syntax:

bool Imagick::vignetteImage( $blackPoint, $whitePoint, $x, $y )

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

  • $blackPoint: This parameter is used to store the value of black point.
  • $whitePoint: This parameter is used to store the value of white point.
  • $x: This parameter stores the value of the X offset of the ellipse.
  • $y: This parameter stores the value of the Y offset of the ellipse.

Return Value: This function returns True on success.
Original Image:

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

Program:




<?php 
// require_once('path/vendor/autoload.php'); 
   
// Create an Imagick Object
$imagick = new Imagick(
   
// vignetteImage Function 
$imagick->vignetteImage(35.6, 11.8, 40, 15);
   
// Image Header
header("Content-Type: image/jpg");
  
// Display image
echo $imagick->getImageBlob();
?>


Output:

Related Articles:

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

RELATED ARTICLES

Most Popular

Dominic
32404 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6776 POSTS0 COMMENTS
Nicole Veronica
11925 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11994 POSTS0 COMMENTS
Shaida Kate Naidoo
6905 POSTS0 COMMENTS
Ted Musemwa
7160 POSTS0 COMMENTS
Thapelo Manthata
6861 POSTS0 COMMENTS
Umr Jansen
6846 POSTS0 COMMENTS