IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
The web page says that coalesceImages() composites the frames but that isn't exactly true. You don't get a single frame as an output. Instead of having frames like a movie, some animations have a fixed background for the first frame followed by a series of frames that may be of different sizes and positions. Coalesce will composite those onto the background so the result has frames all the same size and position like a movie. I use coalesce on all animations before resizing them.
The web page says that coalesceImages() composites the frames but that isn't exactly true. You don't get a single frame as an output. Instead of having frames like a movie, some animations have a fixed background for the first frame followed by a series of frames that may be of different sizes and positions. Coalesce will composite those onto the background so the result has frames all the same size and position like a movie. I use coalesce on all animations before resizing them.
i have try this too. but still goes wrong and i noticed that this feature not work in module version 3. here note from phpmanual.net:
This example works fine with *imagick module version 2.2.1-dev*, but doesn't work correctly with *imagick module version 3.0.1*.
i have try to downgrade the module to 2.3.0 , but still not working.