Manuel PHP

Imagick::chopImage

(No version information available, might be only in CVS)

Imagick::chopImageRemoves a region of an image and trims

Description

bool Imagick::chopImage ( int $width , int $height , int $x , int $y )
Avertissement

Cette fonction n'est pas documentée et seule la liste des arguments est disponible.

Removes a region of an image and collapses the image to occupy the removed portion.

Liste de paramètres

width

Width of the chopped area

height

Height of the chopped area

x

X origo of the chopped area

y

Y origo of the chopped area

Valeurs de retour

Returns TRUE on success.

Erreurs / Exceptions

Throws ImagickException on error.

Exemples

Exemple #1 Using Imagick::chopImage():

Example of using Imagick::chopImage

  1. <?php
  2. /* Create some objects */  
  3. $image = new Imagick();  
  4. $pixel = new ImagickPixel( 'gray' );  
  5.  
  6. /* New image */  
  7. $image->newImage(400, 200, $pixel);  
  8.  
  9. /* Chop image */  
  10. $image->chopImage(200, 200, 0, 0);  
  11.  
  12. /* Give image a format */  
  13. $image->setImageFormat('png');  
  14.  
  15. /* Output the image with headers */  
  16. header('Content-type: image/png');  
  17. echo $image;  
  18.  
  19. ?> 


Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Bretagne - php - Moto - Kit graphique