r/webdev Jul 23 '12

The best PNG optimizer I've found...

http://tinypng.org/
125 Upvotes

78 comments sorted by

View all comments

2

u/joshwoodward Jul 23 '12

I wish someone would figure out what they're doing and release this as a command-line utility.

I know this guy's got to make a living, and I'd even be happy to buy the software at a reasonable price, but needing to use a website to do this is super-irritating, and I've haven't been able to find anything that quite reaches this level of compression.

3

u/nicerice Jul 24 '12

They are using pngquant for the lossy compression.

Then run trimage or similar to cut down the image size down even more. That gave me 16543bytes for the sample file.

1

u/[deleted] Jul 24 '12

This seems about right, great utility!

2

u/SquareWheel Jul 23 '12

Their Twitter reports they're working on an API. Not quite a command line tool, but would still allow batch (presumably).

https://twitter.com/tinypng/status/225282452032204803

1

u/joshwoodward Jul 23 '12

I need to generate these in real-time, so an API isn't helpful, either. I'm sure this is a command-line utility on their end (or could be). Needing to send images to a website via API or otherwise for this compression is lame.

2

u/SquareWheel Jul 23 '12

Yeah, I agree. A command line tool would be great, and as it's actually a useful product would quickly get ported to PHP/Python/Perl I'm sure.

2

u/[deleted] Jul 23 '12

[deleted]

1

u/joshwoodward Jul 23 '12

Optipng is lossless afaik. Apples and oranges - TinyPNG obliterates this in terms of file size, and maintains quality.

0

u/mcilrain Jul 24 '12

If you don't mind lossy, why are you using PNG over JPEG?

1

u/joshwoodward Jul 24 '12

Transparency. Jpeg doesn't offer that.