Custom thumbnail

Is there a a way I can use a separate image for my thumbnails? Some of my images are animated gif and the thumbnail usually gets messed up. An animated thumbnail would be nice if possible. I'm using ImageMagick, and I saw this... not sure how to use it.

`
<?php

try
{
/*** Read in the animated gif ***/
$animation = new Imagick("animation.gif");

/*** Loop through the frames ***/
foreach ($animation as $frame)
{
/*** Thumbnail each frame ***/
$frame->thumbnailImage(100, 100);

/*** Set virtual canvas size to 100x100 ***/
$frame->setImagePage(100, 100, 0, 0);
}

/*** Write image to disk. Notice writeImages instead of writeImage ***/
$animation->writeImages("animation_thumbnail.gif");

echo "Images written";
}
catch(Exception $e)
{
echo $e->getMessage();
}

?>
`

Comments

  • acrylian Administrator, Developer
    Sorry, Zenphoto has no means to use extra thumbnails like this. They are always generated from the full image.

    Your only chance is to write a custom function/plugin for this.
  • Who wants to make a plugin? I'm willing to pay/donate.
  • Probably the best hope for this is if you can convince our Imagick expert that animated GIFs should be fully handled in image resizing. Kataguchi has been somewhat busy with school recently hopes to have more time shortly. You could create a feature request ticket against the Imagick library for this.

    He might even be interested in earning a bit of cash.
  • Will do, thanks.
  • Do I request a ticket through the bugtracker?
  • acrylian Administrator, Developer
    Yes.
Sign In or Register to comment.