Animiertes gif nach verkleinern nicht mehr animiert

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Animiertes gif nach verkleinern nicht mehr animiert

    Hallo

    Also ich hab ne PHP Funktion, die mir aus Bildern Thumbnails erstellt.
    Das klappt auch alles.

    Wenn ich jetzt aber ein animiertes Gif verkleinern will ist es danach nicht mehr animiert.

    Geht das mit PHP nicht anders, oder was muss ich ändern, dass das Bild danach auch noch animiert ist?

    Hier die Funktion
    PHP Code:
    function createThumbnail($imageFile$thumbFile$thumbMaxWidth$thumbMaxHeight)
    {

        if (!(
    $srcImg = @imagecreatefromgif($imageFile))) {
          die(
    "AGERROR:Konnte Thumbnail nicht erstellen.");
        }
        
    $origWidth imagesx($srcImg);
        
    $origHeight imagesy($srcImg);
        if (
    $origWidth $origHeight) {
         
    $ratio $origWidth $thumbMaxWidth;
         
    $thumbWidth $thumbMaxWidth;
         
    $thumbHeight ceil($origHeight $ratio);
        } else {
         
    $ratio $origHeight $thumbMaxHeight;
         
    $thumbHeight $thumbMaxHeight;
         
    $thumbWidth ceil($origWidth $ratio);
        }
        
    $thumbImg imagecreatetruecolor($thumbWidth
    $thumbHeight);
        
    imagecopyresampled($thumbImg$srcImg0000
    $thumbWidth$thumbHeight$origWidth$origHeight);
        
    imagegif($thumbImg"$thumbFile");


    Gruß ich
    Wat für'n Scheiß war dat über meine Mucke? Hast'n Problem? ALTA! Schon mal ne 5000-Watt-BASS-Machine gehört? Geht voll ab, Alta!

    Wacken?! Ist schon vorbei du Spasti!

  • #2
    http://www.google.de/search?q=php+resize+animated+gif

    Comment

    Working...
    X