PHP Doku:: Simulates an image shadow - function.imagick-shadowimage.html

Verlauf / Chronik / History: (2) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzBildverarbeitung und -generierungImage Processing (ImageMagick)The Imagick classImagick::shadowImage

Ein Service von Reinhard Neidl - Webprogrammierung.

The Imagick class

<<Imagick::shadeImage

Imagick::sharpenImage>>

Imagick::shadowImage

(PECL imagick 2.0.0)

Imagick::shadowImageSimulates an image shadow

Beschreibung

bool Imagick::shadowImage ( float $opacity , float $sigma , int $x , int $y )
Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.

Simulates an image shadow.

Parameter-Liste

opacity

sigma

x

y

Rückgabewerte

Liefert TRUE bei Erfolg.


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
nilayanand at gmail dot com
27.07.2009 19:43
<?php
/* Read the image into the object */
$im = new Imagick( 'a.jpg' );
$im->setImageFormat("png");
 
/* Make the image a little smaller, maintain aspect ratio */
$im->thumbnailImage( 200, null );
 
/* Clone the current object */
$shadow = $im->clone();
 
/* Set image background color to black
        (this is the color of the shadow) */
$shadow->setImageBackgroundColor( new ImagickPixel( 'black' ) );
 
/* Create the shadow */
$shadow->shadowImage( 80, 3, 5, 5 );
 
/* Imagick::shadowImage only creates the shadow.
        That is why the original image is composited over it */
$shadow->compositeImage( $im, Imagick::COMPOSITE_OVER, 0, 0 );
 
/* Display the image */
header( "Content-Type: image/jpeg" );
echo
$shadow;
?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)