Imagick functions page 24

Valid
Checks if the current item is valid.
None

Vignette image
Softens the edges of the image in vignette style.
Vignette image example

bool vignetteImage ( float $blackPoint , float $whitePoint, int $x , int $y )

<?php 
$im 
= new Imagick($input);
$im->setimagebackgroundcolor('black');
$im->vignetteImage502555);
$im->writeImage"vignetteImage.jpg" );
$im->destroy();
 
?>
Wave image
Applies a wave filter to the image.
Wave image example

bool waveImage ( float $amplitude , float $length )

<?php 
$im 
= new Imagick($input);
$im->setimagebackgroundcolor('none');
$im->waveImage2050 );
$im->writeImage'waveImage.png' );
$im->destroy();
 
?>
White threshold image
Force all pixels above the threshold into white.
White threshold image example

bool whiteThresholdImage ( mixed $threshold )

<?php 
$im 
= new Imagick($input);
$im->whiteThresholdImage'#dee4b8' );
$im->writeImage'whiteThresholdImage.jpg' );
$im->destroy();
 
?>


Is like ThresholdImage() but force all pixels above the threshold into white while leaving all pixels below the threshold unchanged.
Write image file
Writes an image to a filehandle
None



The handle must be opened with for example fopen.
Write images
Writes an image or image sequence.
Write images example

bool writeImages ( string $filename , bool $adjoin )

<?php 
// All jpg images from a directory
// $images = new Imagick(glob("images/{*.jpg,*.JPG}", GLOB_BRACE));
// Array of images
$images = array('blackThresholdImage.jpg''blurImage.jpg''charcoalImage.jpg');
$images = new Imagick($images);

foreach(
$images as $image) {

$image->thumbnailImage(100,0);
}
// Individual images created in the format output-0.jpg
// $images->writeImages('output.jpg', false); 
$images->writeImages('writeImages.gif'true); 
 
?>
Write images file
Writes all image frames into an open filehandle.
None



This method can be used to write animated gifs or other multiframe images into open filehandle.
writeImage
Writes an image to the specified filename.
writeImage example

bool writeImage ([ string $filename ] )

<?php 
$im 
= new Imagick$input );
$im->unsharpMaskImage(0.5 0.05);
$im->writeImage"writeImage.jpg" );
$im->destroy();
 
?>


If the filename parameter is NULL, the image is written to the filename set by ReadImage() or SetImageFilename().