top | item 6803187

TinyPNG launches API to automate PNG compression

55 points| molf | 12 years ago |tinypng.com

36 comments

order
[+] kken|12 years ago|reply
Is this a viable business idea? E.g. providing a service online that requires a limited amount of processing time and could be packaged in a fairly small program when provided for offline processing?

To the vendor this obviously provides more control. But is it worth it for the client?

Personally, I'd be very reluctant to transfer anything that could be done locally by a small command line tool online.

[+] molf|12 years ago|reply
I'm one of the creators and I can tell you we don't know either. We're a web development agency and this is a side project that got more popular than we imagined. After we launched we got a massive amount of requests for licenses or API subscriptions, so we decided to give it a go and see if we can at least cover the costs.
[+] sachingulaya|12 years ago|reply
Is the standard CGI email form a viable business model? Wufoo says yes.

People will pay small fees to not have to worry about something. The "I'll transition to using self-hosted forms next month but I need this done right now" mentality.

[+] thangalin|12 years ago|reply
Assuming someone has installed curl and is running from the command line, what advantages does this service have over optipng or pngcrush?
[+] molf|12 years ago|reply
TinyPNG combines lossy and lossless compression algorithms. Optipng and pngcrush are lossless only. The difference in file size can be huge.
[+] sturgill|12 years ago|reply
I'm a pretty big fan of TinyPNG. I was actually part of their beta invite for the API and wrote up a quick Ruby gem(1) to automate the process (and to auto-shrink PNGs on a Capistrano deploy). I haven't really messed around with it much since then, but it was fun to write and the team at TinyPNG was very accommodating.

Not sure what I think about their pricing structure, but I wish them the best.

1) https://rubygems.org/gems/tiny_png

[+] tmikaeld|12 years ago|reply
As other mentioned already, a free open source alternative would be pngquant.

Here is a free open source app for OS X that uses it. http://pngmini.com/

[+] masklinn|12 years ago|reply
Works nicely when combined with "classical" PNG optimizers (PNGOut, Pngcrush, AdvPNG). And the same author has a frontend for these (ImageOptim)
[+] onli|12 years ago|reply
I think I like that.

Normally, I compress my pngs with gimp (by indexing them). That works fine, and as I do most of my screenshots as well with it, it is not too cumbersome. But it's not perfect either.

The results of tinypng are a bit better. In my tests the images are almost the same size, text becomes equally blurry, but the gradients are a bit better preserved and the colors less distorted.

With the Api, i can build a small tool which compresses the image for me without having to start gimp.

Like (beware, crappy code):

    #!/bin/bash
    API_KEY=""
    wget -O "${1/.png/_tiny.png}" $(curl --user api:$API_KEY --data-binary @"$1" https://api.tinypng.com/shrink | JSON.sh | egrep '\["output","url"\]' | sed -e 's# [.*\]\t*##' -e 's#"##g')
I won't become a paying customer though, 500 is perfectly fine for me, and I still have gimp. But I can imagine professional CMS-systems (or wordpress setups) including this in their workflow to automatically compress the .pngs inserted by their authors, instead of having to find the best compression method on their own (and rely on the server setup).

PS: If that assumption turns out to be true, it could be worthwhile to build a wordpress plugin using the API to try to push that.

[+] molf|12 years ago|reply
You're correct, some people that have been approaching us had several thousands of images to compress monthly from their web shop or CMS system.

We're offering the free plan for people (perhaps like you) that just want to convert a couple of images whenever they deploy a site or build an app.

[+] drakaal|12 years ago|reply
I can't think of where you would use this. What platform is missing this functionality but has a URLFetch/Curl/FOpen to use the API?

I would also think that if it was viable as a business someone would undercut you quickly. I suspect that a free Google App Engine account would give the API's to do this for a LOT of users at no cost to the host... Looks like I could roll it on GAE and handle about 70k images a day on a free instance or 2M a month on the free instance...

[+] jheriko|12 years ago|reply
has anyone tested this and compared it with other tools?

i seem to have a lot of free tools that do a very good job of this... especially when i add some thought to it. my own tests are basically inconclusive - its does the same job as my choice of tools up-to the point of being clever with colour depth and accepting a little loss, or things like knowing its a normal map so the blue channel can be binned...

/me waits for key to test thoroughly

hmm. looks like it is actually lossy. :/

[+] gdc|12 years ago|reply
We're trying to determine if this is a joke. Is this something that is real?
[+] coin|12 years ago|reply
Why wouldn't it be real?
[+] Vektorweg|12 years ago|reply
Nice idea. But maybe you should do this with webp.
[+] ginko|12 years ago|reply
Something like this should just be released as an open source lib.
[+] sukuriant|12 years ago|reply
Why? It's the developer's choice to sell it or give it away for free.

They wrote something, they noticed a lot of uptake and now want to see if they can monetize this. I don't see a problem here.

[+] 9oliYQjP|12 years ago|reply
Isn't TinyPNG a web GUI around pngquant command line utility?