Google Guetzli compression algorithm squeezes more out of JPEGs

Waiting for images to load is no fun. Neither is paying for bandwidth to serve or receive those images. We've reported in the recent past on Google's efforts to get more detail out of small images and reduce file sizes of images and other web files. The company's Guetzli JPEG encoding algorithm improvement effort looks to have a greater immediate impact because of its ability to potentially reduce image file sizes by up to 35% at the same image quality level when compared to traditional encoders, while maintaining decoding compatibility with existing browsers.

Left: original, center: libjpeg, right: Guetzli.

Note the reduced artifacting in the image on the right compared to the center image.

Guetzli is the product of Google Research Europe, and has been released under the Apache open source license. The development team says the overall approach is similar to the one used in Google's earlier Zopfli algotithm used to compress gzip files and PNG images, and shares little with the RAISR and WebP methods that require "ecosystem changes for compression gains at internet scale," a fancy way of saying they're new formats and need big changes to server and browser software.

Left: original, center: libjpeg, right: Guetzli.

Again, note the difference in artifacting between the center and rightmost images.

JPEG compression has several steps, including color space transformation, discrete cosine transformation, and quantization. According to the Guetzli developers, quantization is the key step where visual quality loss is traded for compression efficiency. Google says Guetzli uses a search algorithm to reduce the difference betweem JPEG's psychovisual modeling and the algorithm's own psychovisual model, which it says "approximates color perception and visual masking in a more detailed way." The result is more detail with smaller file sizes, at a cost of substantially higher resource utilization at compression time.

Google says Guetzli can produce smaller file sizes with the same level of quality. The company performed experiments where images of equal file size were shown to study participants who consistently prefered the imaged compressed using Guetzli. It's worth noting that even though the encoding process is slower, that should have a relatively small real-world on servers since image downloads vastly outnumber uploads, where the processing takes place.

A new JPEG compression algorithm doesn't sound as exciting as a method of enhancing small images like fictional forensics investigators in television shows do all the time, but the ability to reduce file sizes without requiring updates to browsers is probably more useful, particularly in the near future. The developers close their notes with wishes that others will pick up the baton and apply the techniques to other image fromats and to video.

Comments closed
    • ronch
    • 3 years ago

    “GUETZLI??? WHAT KIND OF STUPID NAME IS THAT!!!!”

    – Mad Dog Tannen

    • gigafinger
    • 3 years ago

    I dunno. Goatse could use more compression…

    • mkk
    • 3 years ago

    But GIF’s are the real problem in 2017.

    Kidding, but not only. Ten years ago animated GIF was almost dead, and I wouldn’t believe there could ever be a comeback.

      • boing
      • 3 years ago

      The two formats that were meant to replace animated GIF didn’t succeed in doing so.

      MNG never got supported by any web browser beyond Firefox. And APNG support was very limited as well.

      A more recent and modern format, WebP, is supported by almost all web browsers. Though I can’t say I’ve seen any animated images used in recent years, regardless of their format. Not after I uninstalled Adobe Flash.

      • EndlessWaves
      • 3 years ago

      You don’t see them that often these days, a lot of animated ‘images’ are actually controlless videos.

    • The Dark One
    • 3 years ago

    Good encoding profiles are important. A recent example involves x264 videos streams and not still images, but Crunchyroll changed the way its transcoding infrastructure worked and massively reduced the perceived quality of their streams.

    • FranzVonPapen
    • 3 years ago

    >betweem JPEG’s psychovisual modeling

    • Shouefref
    • 3 years ago

    NIce. Now we can send around even more useless images. More cats! More dogs! More baby’s!

    • Laykun
    • 3 years ago

    Great. How much bandwidth is wasted by web publishers that just use poor compression settings? This is a nice optimisation and all but it assumes that people that publish images are already using optimal compression settings and generally know what they’re doing. Or is this more for when you put your photos up on Facebook or put your photos on Google photos and it does all it’s processing for you?

      • thor84no
      • 3 years ago

      It’s also whether or not they care. I usually use png instead of jpeg as it is – unless the image lends itself to svg in which case I use that. Bandwidth is cheap, and quality matters.

    • Bumper
    • 3 years ago

    try saying that three times fast.

      • bthylafh
      • 3 years ago

      Now there’s this obnoxious ghost telling me that I’m German.

    • green
    • 3 years ago

    [url<]https://github.com/google/guetzli[/url<] [quote<]Guetzli uses a large amount of memory. You should provide [b<]300MB[/b<] of memory per [b<]1MPix[/b<] of the input image.[/quote<] so only for web image sizes (non-retina quality) and definitely not for use on current mobiles devices you take your happy snaps on (16MPx => 4.8GB memory recommended)

      • jihadjoe
      • 3 years ago

      I guess there had to be a drawback somewhere. If you’re a content author running a website though, it should be quite useful for publishing.

      • Waco
      • 3 years ago

      That’s only for compression, though, so it doesn’t affect who uses it.

        • CuttinHobo
        • 3 years ago

        I think what green meant was that it’ll be a while before phones can take advantage of this algorithm for compressing selfies and Instagram meal pix due to its steep memory requirements. 🙂

          • Waco
          • 3 years ago

          Brain fart on me. 😛

          • thor84no
          • 3 years ago

          There are existing phones with more memory than that (the OnePlus 3T has 6GB for example), so I wouldn’t think it would be that long before it becomes common for phones to be more than capable of doing that.

          • just brew it!
          • 3 years ago

          Who uploads selfies at full 16MPx resolution anyway? Downsampling prior to compression seems like a reasonable compromise for that use case.

            • CuttinHobo
            • 3 years ago

            I guess selfies would be more like 5MPx anyway… But the Instagram meal pix need the highest quality algorithm. 😀

            • VincentHanna
            • 3 years ago

            How can you count my nosehairs if I’m not uploading the full 16MP image?

    • Visigoth
    • 3 years ago

    PNG or GTFO! Lossless > *

    • deruberhanyok
    • 3 years ago

    Hmm. Are they using a “middle out” algorithm?

      • Dposcorp
      • 3 years ago

      I can’t believe it took 12 replies for that to come up.
      Its the only reason I popped in to the comments on this 🙂

    • mat9v
    • 3 years ago

    Anyone here knows if this will require new decoder on client end or if standard decoder will decode it just fine?

      • just brew it!
      • 3 years ago

      Same decoder. The files produced still conform to the JPEG standard.

    • Neutronbeam
    • 3 years ago

    This is all BOGUS stuff for the untutored masses. Guetzli is a well-known Alpine cheese made in teeny, tiny batches with great attention to detail and beautiful visual presentation. Check with drfish; he’ll back me up!

    • Longsdivision
    • 3 years ago

    Where’s the ‘Enhance’ button?

      • Stochastic
      • 3 years ago

      Over here: [url<]https://9to5google.com/2017/02/07/googles-new-image-project-brain-makes-sci-fis-zoom-and-enhance-a-reality/[/url<]

    • JosiahBradley
    • 3 years ago

    The eye image on the right is noticeably worse than the libjpeg method notice the complete loss of color in the pupil reflection. Either way jpeg is garbage, long live PNG/RAW and unlimited bandwidth.

      • just brew it!
      • 3 years ago

      There’s significantly less artifacting in the area above the eye though. So they’ve basically traded one sort of error for a different (and presumably deemed less noticeable) one.

    • I.S.T.
    • 3 years ago

    Seems like it’s better than libjpg but worse than standard jpg. For most situations it’s fine, though.

      • boing
      • 3 years ago

      Could you please elaborate on how libjpeg is different from “standard” jpeg?

        • psuedonymous
        • 3 years ago

        In the same way as Guetzil is different from “standard” JPEG. You output a JPEG-compliant file format, but you use a different process to get that final format. Same with the ‘PSY optimisations’ in x.264 that provide perceptibly improved quality rather than PSNR or SSIM optimisations that improve mathematical error but not necessarily perceived quality.

          • thor84no
          • 3 years ago

          I’m still not seeing where the statement that it’s “worse than standard jpg” came from.

            • just brew it!
            • 3 years ago

            Or put another way, what *is* “standard jpg”?

    • chuckula
    • 3 years ago

    The more you tighten your grip, Google, the more pixels will slip through your fingers.

      • dpaus
      • 3 years ago

      When you posted that, I felt a great disturbance, as if a million neurons responsible for humour had suddenly cried out in pain, and then vanished. Fortunately, the great cry of pain was 35% shorter this time.

Pin It on Pinterest

Share This