• Obinice@lemmy.world
    link
    fedilink
    arrow-up
    18
    arrow-down
    3
    ·
    9 days ago

    And yet, surprisingly, I can often get a gif down to a smaller file size and better image quality than a webp file.

    Still, there’s hope for it yet if it improves!

    • Baguette@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      2
      ·
      9 days ago

      Aren’t gifs just each individual frame bundled together? So there’s no space saving with a gif without reducing resolution

      • SatyrSack@quokk.auOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        9 days ago

        I think they can be a little more complex than that. When creating a GIF in GIMP, there is a function to “Optimize” which gets rid of redundant pixels that are the exact same on multiple frames (or something like that). Whatever it does, it definitely reduces the final file size. Any time I make an animation that has to be a GIF file for whatever reason, I try to make it in GIMP to make use of that feature.

        https://docs.gimp.org/3.0/en/plug-in-optimize.html

      • [object Object]@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        9 days ago

        GIF uses transparency to overlay a frame over the previous one, so colors for the unchanged pixels can be collapsed to the transparent color to get better compression.

        Of course, this is rather primitive compared to anything invented since MPEG-2.

        • Baguette@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          2
          ·
          9 days ago

          Huh the more you know

          Always thought gif was essentially implemented as a slideshow and that modern codecs implement all the space saving that gif doesn’t