- $magick = new Imagick($imagefile->filepath);
- $magick = $magick->coalesceImages();
- $magick->setIteratorIndex(0);
- do {
- $magick->cropImage($box['w'], $box['h'], $box['x'], $box['y']);
- $magick->thumbnailImage($box['width'], $box['height']);
- $magick->setImagePage($box['width'], $box['height'], 0, 0);
- } while ($magick->nextImage());
- $magick = $magick->deconstructImages();
+ break;
+ }
+ return true;
+ }
+
+ protected function resizeImageFileAnimatedGif(ImageFile $imagefile, $outpath, array $box)
+ {
+ $magick = new Imagick($imagefile->filepath);
+ $magick = $magick->coalesceImages();
+ $magick->setIteratorIndex(0);
+ do {
+ $magick->cropImage($box['w'], $box['h'], $box['x'], $box['y']);
+ $magick->thumbnailImage($box['width'], $box['height']);
+ $magick->setImagePage($box['width'], $box['height'], 0, 0);
+ } while ($magick->nextImage());
+ $magick = $magick->deconstructImages();