Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
TinyPNG launches API to automate PNG compression (tinypng.com)
55 points by molf on Nov 26, 2013 | hide | past | favorite | 36 comments


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.


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.


I have to admit this one is a bit of a head scratcher, but I get why it works at least for now. You've essentially built a SaaS bug fix for a shrink wrap product, which.. yeah.


Back when I was slicing and dicing specs that had to be compatible with IE6, I really wish I could have used TinyPNG. Preserves alpha transparency that works in really crappy browsers, without resulting to weird CSS filter shenanigans.

But even today, I really enjoy the service. Not sure what I would pay for it, but it is very convenient.


Interesting. Thanks for replying. So I guess it is mainly a question of convenience right now.


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.


> 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?

You mean something like optipng: http://optipng.sourceforge.net/ or pngcrush: http://pmt.sourceforge.net/pngcrush/


My favorite technique for optimizing PNG files comes from Wikipedia's page on preparing images to be used in Wikipedia:

http://en.wikipedia.org/wiki/Wikipedia:Preparing_images_for_...


Assuming someone has installed curl and is running from the command line, what advantages does this service have over optipng or pngcrush?


TinyPNG combines lossy and lossless compression algorithms. Optipng and pngcrush are lossless only. The difference in file size can be huge.


ok, what about pngquant? Seems to be doing about the same thing. I've been using it in batch scripts for processing hundreds of PNGs, repeatedly, with good results.

http://pngquant.org/


Yes, pngquant is awesome. TinyPNG uses it internally and combines it with other, lossless optimizations. We built TinyPNG for ease of use (no configuration, no settings to mess around with) and to reach a wider audience. Definitely use the tools you're most comfortable with!


PNGout is a pretty decent program. I install it when running Windows.


Why don't you just open-source this?


Because they don't want to?

It's really nice when people open source things, but people don't have to do so, especially if they hope to make a little money off it.


But what's the harm in asking?

That comment (at the time of this post) is greyed out. So for some reason people are downvoting him for asking.


i didn't downvote but i really used to hate this attitude

"well why don't you learn to code and make it yourself" is the gut response to it...


Sure, it's easy to see things in terms of "gimme" or "fuck you, I got mine." But there's also "we're just talkin' here, no judgement is being made. They built on a BSD library, why not submit a patch?"

It's not hard to read the judgement into the question though. Especially if you consider what the handful of popular viewpoints that show up on HN tend to be.


Do you realize that you are trolling?

Why should they? What's in it for them?


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


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/


Works nicely when combined with "classical" PNG optimizers (PNGOut, Pngcrush, AdvPNG). And the same author has a frontend for these (ImageOptim)


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.


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.


I use Pngyu ( http://nukesaq88.github.io/Pngyu/) and it gives me the same compression as tinypng.


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...


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. :/


We're trying to determine if this is a joke. Is this something that is real?


Why wouldn't it be real?


Nice idea. But maybe you should do this with webp.


This is perverted.


Something like this should just be released as an open source lib.


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.



Isn't TinyPNG a web GUI around pngquant command line utility?


Probably some AdvPNG &al as well, on top of pngquant.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: