V
V
Vlad2014-06-17 21:23:10
PHP
Vlad, 2014-06-17 21:23:10

How is a gif animation resized using the GraphicsMagick php module?

Hi all.
I've looked all over Google, I can't find the code for resizing gif animation in GMagick php.
Can you write the simplest processing examples?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad, 2015-01-08
@p1rat495

if anyone needs it, I recently found
$img = new Gmagick($file);
$image = $img->coalesceImages();
do {
$image->cropthumbnailimage(150, 150);
} while ($image->nextImage());
$image->writeImage($newFile.'.gif');
$img->destroy();

M
Mikhail Alekseev, 2014-06-17
@Fandorin

You can do this:
system("convert big.gif -coalesce coalesce.gif");
system("convert -size 200x100 coalesce.gif -resize 200x10 small.gif");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question