News for hackers. Stuff that matters.
Re:The Tiniest GIF Ever by kevinconroy on Sunday September 09, 2012 @04:36PM (#4496895)
Great write up and +1 kudos to author for diving into the details.

For the mere mortals out there looking to make their GIF, JPEG, and PNG images smaller (and websites faster), I highly recommend ImageOptim (http://imageoptim.com/). This Mac-only tool combines all of the libraries below to compress your images down to the (nearly if not the) smallest, cross-system compatible size.

If you're Mac based, try this:

* ImageOptim http://imageoptim.com/

If you're Linux based, try these:

* PNGOut - http://www.advsys.net/ken/util/pngout.htm

* advpng - http://advancemame.sourceforge.net/doc-advpng.html

* pngcrush - http://pmt.sourceforge.net/pngcrush/

* optipng - http://optipng.sourceforge.net/

* jpegoptim - http://www.kokkonen.net/tjko/projects.html

* gifsicle - http://www.lcdf.org/gifsicle/

Re:The Tiniest GIF Ever by jtheory on Sunday September 09, 2012 @06:14PM (#4497208)
The coolest aspect of this article IMO was that Gimp's output (with the right options selected) was already the minimum size for a transparent 1x1 gif.

He succeeded in trimming only 6 bytes off of that before he abandoned transparency and that was at the cost of getting errors in some programs with the result (no thanks).

Re:The Tiniest GIF Ever by kizza on Monday September 10, 2012 @06:41AM (#4499124)
For Linux, Trimage does the same thing as ImageOptim, plus it works on the command line:

http://trimage.org/

Re:The Tiniest GIF Ever by Inversechi on Sunday September 09, 2012 @04:58PM (#4496966)
Just to add... for PNG optimisations on Windows.

* PNGGauntlet - http://pnggauntlet.com/ - Combines PNGOUT, OptiPNG, and DeflOpt.

Re:The Tiniest GIF Ever by j_s on Monday September 10, 2012 @02:35PM (#4501324)
If you're desperate to save space (or creating thumbnails), Windows/C# devs can lossily cut down PNGs to 256 color/8-bit using nQuant http://nquant.codeplex.com/

Matt Wrock documented the creation of the tool, including details on the approaches taken by tools like OptiPNG: http://www.mattwrock.com/post/2011/09/05/Convert-32-bit-PNGs...

Re:The Tiniest GIF Ever by molf on Sunday September 09, 2012 @05:55PM (#4497145)
Worth mentioning as well is TinyPNG - http://tinypng.org/, a free web service that uses lossy compression to shrink PNG images.
Re:The Tiniest GIF Ever by ars on Sunday September 09, 2012 @06:41PM (#4497302)
If you want it locally: http://pngnq.sourceforge.net/

I think the service simply uses that program behind the scenes.

Re:The Tiniest GIF Ever by SquareWheel on Sunday September 09, 2012 @06:47PM (#4497319)
No, they use their own tech. It uses some pre-existing algorithms but it's currently not available for offline use.
Re:The Tiniest GIF Ever by j_s on Monday September 10, 2012 @02:44PM (#4501376)
http://news.ycombinator.com/item?id=4167964 (by molf, apparently someone involved in creating TinyPNG)

   > Mostly pngquant (the new version), optipng and 
   > advpng. We are still tuning parameters and 
   > swapping in and out tools based on our benchmarks 
   > and testing suite.
from their debut on HN back in June, where they caught a lot of flack for being a web service:

http://news.ycombinator.com/item?id=4167964

Re:The Tiniest GIF Ever by SquareWheel on Monday September 10, 2012 @04:56PM (#4502215)
Interesting read, thanks.
Re:The Tiniest GIF Ever by pornel on Monday September 10, 2012 @06:39AM (#4499116)
TinyPNG uses http://pngquant.org and optipng.
Re:The Tiniest GIF Ever by SquareWheel on Monday September 10, 2012 @07:24AM (#4499212)
It's a bit more than that, I know advpng is also used somewhere in the process.
Re:The Tiniest GIF Ever by SquareWheel on Sunday September 09, 2012 @06:46PM (#4497314)
In my tests, it's lossy, but it's just barely lossy. Keep your original and deploy this version on your site.

I just wish they had an API/offline utility.

Re:The Tiniest GIF Ever by benmanns on Sunday September 09, 2012 @07:29PM (#4497449)
While I didn't see any public mention of it, you can use

  curl --data-binary @your-file.png http://tinypng.org/api/shrink
Re:The Tiniest GIF Ever by SquareWheel on Monday September 10, 2012 @04:08AM (#4498796)
That's fantastic, thanks. I wonder if they'd mind me creating a batch tool for personal use...
Re:The Tiniest GIF Ever by przemoc on Monday September 10, 2012 @08:28AM (#4499377)
I did a few tests some time ago and to obtain tiniest possible images on majority of files I have to do following sequences

PNG: advpng -z4, optipng -o7, advdef -z4

JPG: jpegtran -copy none, jpegrescan (that also uses jpegtran)

GIF: gifsicle -O3

They are quite time consuming (especially in case of PNG), but if you know any better sequences, please let me know!

Re:The Tiniest GIF Ever by Teapot on Monday September 10, 2012 @11:56AM (#4500426)
http://davidcrowell.com/jstrip

jscl.exe -d -j -n -r -s ¤.jp¤

Instantly gets rid of more jpg junk.

Edit: replace asterixes with ¤

Re:The Tiniest GIF Ever by treskot on Monday September 10, 2012 @03:47AM (#4498743)
Pngcrush is a great alternative.. and so is smushit - http://www.smushit.com/ysmush.it/
Re:The Tiniest GIF Ever by mistercow on Sunday September 09, 2012 @06:48PM (#4497321)
For PNGs, I have yet to come across a tool that would beat PNGOUT.
Re:The Tiniest GIF Ever by verisimilitude on Sunday September 09, 2012 @08:15PM (#4497607)
ImageOptim is essentially a wrapper for, among other tools, PNGOUT.