4 ms·
Instant 8-bit alpha PNG converter
- pedrokost 16y agoThank you a lot for the tool. I had no idea I could compress PNG so much, without loosing too much quality. I will be a heavy user of this.
- ck2 16y agoTo clarify, I didn't make this site, just discovered it while googling how to accomplish this without Fireworks. The "beauty" of 8-bit png is how it degrades acceptably in IE8, IE7 and even IE6. Try comparing a large round icon in 1-bit alpha (ie. gif) vs 8-bit alpha, it's much much better.
- davej 16y agoIE7 and IE8 can display 32bit (24bit for RGB + 8bit for alpha channel) PNGs fine by the way. IE6, of course, only supports alpha transparency on 8bit PNGs.
- etherealG 16y ago<3
- aw3c2 16y agoWhat is the difference to using say optipng?
- ck2 16y agooptipng/pngout/pnggauntlet are "only" png optimizers this site gracefully degrades a png with 24bit alpha transparency to 8bit alpha so you don't have to settle for a gif. I suspect they are using pngnq http://pornel.net/pngnq http://pornel.net/pngnq and pngquant http://pornel.net/pngquant http://pornel.net/pngquant Some background here: http://blogs.sitepoint.com/png8-the-clear-winner/ http://blogs.sitepoint.com/png8-the-clear-winner/ http://www.ethanandjamie.com/blog/81-png8-transparency-without-fireworks http://www.ethanandjamie.com/blog/81-png8-transparency-witho... That site is great because it's so easy, they did some very impressive drag-and-drop code and it makes very high quality output that is as good as Fireworks.
- TillE 16y agoYeah, most of the compression seems to come from converting from RGB to colormap with pngquant. I wonder if it's possible to do all this with an ImageMagick one-liner.
- beej71 16y agoHere's a real example, using a test image that has a lot of different alpha values in it, and a 24-bit alpha channel: Original: 87047 bytes optipng -o7: 82489 bytes this tool: 22585 bytes The main difference, other than size, is that optipng produced an exact copy of the the original, while this tool is lossy, and threw away a bunch of data from the alpha channel. The win is that for the majority of all web cases, 8 bits of alpha is plenty.
- ck2 16y agoNote that it's not perfect for all cases, but it's certainly acceptable for small icons. Here's a 32x32 icon I converted down to 8-bit alpha and then 1-bit, and then resized the whole group so they could be more closely examined: http://i.imgur.com/XTksy.png http://i.imgur.com/XTksy.png
- nathos 16y agoMac users should check out ImageAlpha for optimizing 8-bit PNGs: http://pornel.net/imagealpha http://pornel.net/imagealpha
- ck2 16y agoI was actually looking for a Windows equivalent to that when I found this wesite.
- hecticjeff 16y agoSource code is available on GitHub: https://github.com/thingsinjars/8bitalpha https://github.com/thingsinjars/8bitalpha
- pornel 16y agoI've got improved pngquant that gives significantly better results than original version, gd2 library and often rivals pngnq: https://github.com/pornel/improved-pngquant https://github.com/pornel/improved-pngquant It is a bit slow (converts image several times feeding back result's quality back to the algorithm), but difference in quality is significant: http://geekhood.net/8bitalpha.png http://geekhood.net/8bitalpha.png - converted via website http://geekhood.net/imagealpha0.7.png http://geekhood.net/imagealpha0.7.png - converted with pngquant 1.3
- pbhjpbhj 16y agoAnyone know of a more recent apt repos for pngquant than 1.0-4 (standard Ubuntu repos)?
- pornel 16y agoI doubt there will be one, as Greg Roelofs doesn't actively maintain it (I have submitted my changes to him long time ago, and the response was he also got other patches and doesn't have time to merge them).
- aw3c2 16y agoAny chance to build this with libpng14? I think compiling fails for me because I do have that modern version installed and not libpng12.
- pornel 16y agoIt definitely works with 1.4.1, but the bundled Makefile sucks. Just compile *.c and link it against libpng in whatever way your system requires.
- aw3c2 16y agoThanks! I am clueless when it comes to compiling though so for me that stop right at "linking". I only know that that has something to do with those .o files. :-) I did find http://pngnq.sourceforge.net/ http://pngnq.sourceforge.net/ and just installed that.
- thingsinjars 16y agoWow, I go on holiday away from a decent internet connection and next thing you know, HN front page. Urk. Hope it all works well for everyone. As mentioned, the source is all on github (https://github.com/thingsinjars/8bitalpha https://github.com/thingsinjars/8bitalpha) so if there are any improvements, fork away. I'll try and keep an eye on it in case something breaks but I'm a bit limited to an iPhone SSH client on a foreign country's network so play nice. :D I'm glad people are finding it useful, though.
- ck2 16y agoGreat work, many thanks for the source. Ah, now I see it's a far cry from pngng/pngquant https://github.com/thingsinjars/8bitalpha/raw/master/image.php https://github.com/thingsinjars/8bitalpha/raw/master/image.p... Some php gd2 conversion, gets the job done but it's not as sophisticated. Still, huge potential to slide in other solutions, even via shell.