$image = new Imagick('animated.gif'); $image->setIteratorIndex(0);
$image = new Imagick('animated.gif'); $num_frames = $image->getNumberImages(); for ($i = 0; $i < $num_frames; $i++) { $image->setIteratorIndex($i); $image->embossImage(1, 0.5); } $image->writeImages('embossed.gif', true);In this example, we loop through all frames in an animated GIF and apply an emboss filter to each one. We use the `getNumberImages` method to determine the total number of frames in the image. The package library in this case is the PHP Imagick extension, which provides an object-oriented interface to the ImageMagick library for PHP.