Animated gif

How can I make an animated gifs animated in image view?

Comments

  • acrylian Administrator, Developer
    You have to modify your theme to show the full iamge directly. All other images are processed via the GDlib which "kills" animated gifs somehow. If your server supports you may try Imagemagick instead (although I don't know if it preseverses animated gifs).
  • I am using Imagemagcik.

    Do I have ta change something here in image.php?

    `

    " title="<?php echo getBareImageTitle();?>"><?php printDefaultSizedImage(getImageTitle()); ?>
    <?php } else { ?>
    <?php printDefaultSizedImage(getImageTitle()); ?>
    <?php } ?>


    `
  • Is there I way I can replace <?php printDefaultSizedImage(getImageTitle()); ?> with <?php printFullImage(getImageTitle()); ?> ? Or something similar? Also I'd really want this to only work for GIF files... all other files can use default size...

    Any help is appreciated.

    Thanks!
  • acrylian Administrator, Developer
    Yes, please read the theming tutorial and visit the functions documentation.
  • I got something working... if anyone needs support for animated gif this is one work around.

    In the template-functions.php I added:
    `
    function getAlName()
    {
    return getAlbumTitle();
    }
    `
    In my template's image.php I replaced:
    `
    <?php if(getOption('use_colorbox_image')) { ?>
    " title="<?php echo getBareImageTitle();?>"><?php printDefaultSizedImage(getImageTitle()); ?>

    <?php } else { ?>
    <?php printDefaultSizedImage(getImageTitle()); ?>
    <?php } ?>
    `
    with:
    `
    <?php if(getAlName() == gettext('Animated')) { ?>
    <?php if(getOption('use_colorbox_image')) { ?>
    " title="<?php echo getBareImageTitle();?>">image" width="<?php echo getFullWidth(); ?>" height="<?php echo getFullHeight(); ?>" alt="<?php echo getImageTitle() ?>">

    <?php } else { ?>
    image" width="<?php echo getFullWidth(); ?>" height="<?php echo getFullHeight(); ?>" alt="<?php echo getImageTitle() ?>">

    <?php } ?>
    <?php } else { ?>
    <?php if(getOption('use_colorbox_image')) { ?>
    " title="<?php echo getBareImageTitle();?>"><?php printDefaultSizedImage(getImageTitle()); ?>

    <?php } else { ?>
    <?php printDefaultSizedImage(getImageTitle()); ?>
    <?php } ?>
    <?php } ?>
    `
    It will only use the full image for albums with the name "Animated". It's not clean or elegant, but it works. =)
  • I'm also interested in displaying animated gifs.

    How do I modify the above code to display full animated gifs when tagged with 'animated' in image.php? I was thinking of putting the code in the gallery codeblocks.

    Currently only colorbox slideshow shows the animated gifs. I would like to have the image page itself showing the original gif image.
  • The GD library does not process animated GIFs, so you have to have available and enabled the Imagick library and handler. If you have not option for selecting Imagick then your server does not have support for it.

    Your other option is to load the images in the exact size that would be cached for the image page. Then the image will be copied rather than resized.
Sign In or Register to comment.