It is currently Sat Mar 25, 2017 8:31 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 12:41 am  (#1) 
Offline
GimpChat Member

Joined: Nov 04, 2015
Posts: 5
I'm a Gimp user who lives in Tasmania and has been getting ideas from Gimpchat for a few years.
Last week I found something I have needed for a long time - A JPEG compression algorithm from Google called
'Guetzli'.
I know you guys are going to appreciate it and use it. I found it can reduce a JPG by about half for publishing to the web.
You will need to get it from GitHub. Search for it there.
I don't work for google (nobody in Tasmania does ;)) I use Gimp and open source.
I did an article on how I made it work on Ubuntu Linux if anyone needs help.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 3:27 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3456
Tas_mania wrote:
I'm a Gimp user who lives in Tasmania and has been getting ideas from Gimpchat for a few years.
Last week I found something I have needed for a long time - A JPEG compression algorithm from Google called
'Guetzli'.
I know you guys are going to appreciate it and use it. I found it can reduce a JPG by about half for publishing to the web.
You will need to get it from GitHub. Search for it there.
I don't work for google (nobody in Tasmania does ;)) I use Gimp and open source.
I did an article on how I made it work on Ubuntu Linux if anyone needs help.

Do you have some sample files? I downloaded the code from Github and compiled it according to instructions, but the only output I get from it is the message "Invalid input JPEG file". Since that JPEG is straight off my camera, I wonder what is wrong with it.

Btw, Google isn't talking about 50%, but just 30%... from the GitHUb page:
Quote:
Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg


(and this is a bit ambiguous, since very few people use libjpeg, most Linux distros use a faster fork called libjpeg-turbo).

Edit: it appears that the mistaken "Invalid input JPEG file" this is a known problem, which is just that guetzli doesn't understand JPEG files with a sub-sampled chroma (which is very frequent in JPEG files, since this is where most of the size gain comes from). Not supporting this right out shows two things:
  • the authors have little practical knowledge of JPEG files
  • guetzli hasn't been tested with real files from real cameras

_________________
Image


Last edited by ofnuts on Mon Mar 20, 2017 3:50 am, edited 1 time in total.

Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 3:49 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Oct 30, 2016
Posts: 34
Location: time&space
Image

_________________
Image


Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 4:01 am  (#4) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1048
Location: Here and there
@Tas_mania:

How long does it take to encode a big image? The GIMP bugzilla requesting support has a comment that suggests it takes several minutes to encode a 16mp image: https://bugzilla.gnome.org/show_bug.cgi?id=780230

Kevin


Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 4:21 am  (#5) 
Offline
GimpChat Member

Joined: Nov 04, 2015
Posts: 5
Hi ofnuts.
As a newbie my punishment is no links but that error message is addressed with a workaround:
You may have to open those big JPEGS in GIMP first and export as PNG's. :gimp
Apparently optical cameras have varying colour systems.
So far I have only used XCF's that I exported as JPG's and the program seems to like them.

Your right 30% is more like the actual improvement. I found I could set the 'export as..' slider to higher quality and let Guetzli
reduce it down again. I usually aim for about 150kb per image for the web. I'm actually getting a 50% improvement combining Gimp and Guetzli but image quality is very subjective.
Is Guetzli a spin-off from AI or seeing eye robots?

Thanks for the welcome TimeLord. Do you have a telephone box app on your mobile phone :)


Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 4:55 am  (#6) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3456
Yes, I have seen the work around... but it strikes me as funny that something which is supposed to improve on the JPEG standard isn't aware of one of its most well-known feature.

Further more, the first setting of chroma sub-sampling by design reduces the output file size by 33%(*). The guetzli folks don't know about chroma sub-sampling, so they must have compared their files to full-chroma JPEG. If they had compared them to half-chroma files they would have found no gain...

(*) The JPEG file is encoded as 3 channels, a luminosity one and two chroma ones (like old analog color TV). So it compresses 3 bitmaps. In full chroma, each bitmap is the size of the original image. But JPEG takes advantage of the better sensitivity of our eyes to luminosity than to color(*). So, in halved chroma, pairs of adjacent pixels are replaced by one single pixel (as if the image was scaled 1/2x vertically or horizontally) and in quartered chroma squares of 4 pixels are replaced by one pixel ((as if the image was scaled 1/2x vertically and horizontally). So you encode:
  • In full chroma: 1+1+1=3 image sized bitmaps
  • In halved chroma: 1+.5+.5=2 image sized bitmaps (33% reduction...)
  • In quartered chroma: 1+.25+.25=1.5 image-sized bitmaps (50% reduction...)
(and this reduces the computing time...)
(**) Try this in Gimp:
  • open your favorite picture
  • duplicate the layer
  • On the bottom layer Colors>Desaturate>Luminosity
  • On the top layer: Filters>Blur>Pixelize (2x2). Pixelisation is visible
  • Now set the top layer to "Color" blend mode... You can even try with a 4x4 pixelization...

_________________
Image


Last edited by ofnuts on Mon Mar 20, 2017 5:05 am, edited 2 times in total.

Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 5:01 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Apr 01, 2012
Posts: 4396
Location: Adelaide, South Australia
Welcome to Gimp Chat Tas_mania :hi5

_________________
Image


Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 5:27 am  (#8) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1048
Location: Here and there
CNET has a nice description of how the process works: https://www.cnet.com/news/google-jpeg-g ... earch-web/

But the TL;DR version: it's trying different settings to see which is best, but as Ofnuts points out - it's already known which setting gives the biggest reduction in file size. I suspect this new process is looking for an "optimal" compromise between file size and subjective image quality.


Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 7:17 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 9796
Read about this compressor yesterday. Seeing is believing. Maybe someone will create a GIMP plugin to use this algorithm since it's now open source. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Introducing Me And The Guetzli Image Compressor From Google
PostPosted: Mon Mar 20, 2017 7:49 am  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3456
lylejk wrote:
Read about this compressor yesterday. Seeing is believing. Maybe someone will create a GIMP plugin to use this algorithm since it's now open source. :)

Not sure I want to wait several minutes while the save plugin grinds on my image... Best done offline IMHO.

_________________
Image


Top
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group