downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Imagick::colorFloodfillImage> <Imagick::clutImage
[edit] Last updated: Fri, 25 May 2012

view this page in

Imagick::coalesceImages

(PECL imagick 2.0.0)

Imagick::coalesceImagesCompose un jeu d'images

Description

Imagick Imagick::coalesceImages ( void )

Compose un jeu d'image en respectant toutes les positions et les méthodes de dispositions. Les séquences d'animations GIF, MIFF, et MNG, commencent typiquement par une image une fond, puis toutes les images suivantes varient en taille et position. Retourne un nouvel objet Imagick où chaque image de la séquence est de la même taille que la première, et composée avec la suivante dans la séquence.

Valeurs de retour

Retourne un nouvel objet Imagick en cas de succès.

Erreurs / Exceptions

Lance une exception ImagickException si une erreur survient.



add a note add a note User Contributed Notes Imagick::coalesceImages
vikomic at gmail dot com 02-May-2011 03:58
Here goes an exaple how to resize GIF-s.

<?php
$imagick
= new Imagick("original.gif");

$format = $imagick->getImageFormat();
if (
$format == 'GIF') {
 
$imagick = $imagick->coalesceImages();
  do {
    
$imagick->resizeImage(120, 120, Imagick::FILTER_BOX, 1);
  } while (
$imagick->nextImage());
 
$imagick = $imagick->deconstructImages();
 
$imagick->writeImages('new_120x120.gif', true);

 
// can be added some more gifs
 
$imagick = $imagick->coalesceImages();
  do {
    
$imagick->resizeImage(100, 100, Imagick::FILTER_BOX, 1);
  } while (
$imagick->nextImage());
 
$imagick = $imagick->deconstructImages();
 
$imagick->writeImages('new_100x100.gif', true);
}

$imagick->clear();
$imagick->destroy();
?>

You can use any resize method (resizeImage) with this example.

This example works fine with *imagick module version 2.2.1-dev*, but doesn't work correctly with *imagick module version 3.0.1*.

 
show source | credits | sitemap | contact | advertising | mirror sites