Simon Willison’s Weblog

7 items tagged “png”

I pushed 20 more of my projects to GitHub. Some great Node.js stuff here from Peteris Krumins, including modules for processing PNG, JPEG and animated GIFs. # 23rd September 2010, 1:18 am

PNGStore—Embedding compressed CSS & JavaScript in PNGs. Cal did some further analysis on the CSS/JS to PNG compression trick (including producing some interesting images of jQuery compressed using different image packing techniques) and found it to be slightly less effective than regular GZipping. # 23rd August 2010, 9:47 am

10K Apart Contest: Cheating by Compressing Your JavaScript and CSS to PNG Images. Fascinating hack: transform your JS and CSS in to coloured pixels, save the result as a PNG to benefit from PNG’s built in compression algorithms, then read the data back out of the PNG and convert it back to text using JavaScript and canvas—all to reduce the on-disk filesize when entering the 10K app competition. Alex’s GithubFinder entry is worth checking out too. # 23rd August 2010, 9:45 am

Load Windows ICO files. Apparently PIL has trouble with the most recent versions of the windows .ico format (Vista now embeds PNG images in them)—this clever function deals with the differences and gives back a PIL Image object. # 17th January 2009, 9:48 pm

Google’s undocumented favicon to png convertor (via) Showing the favicon of a domain next to a link is a really nice trick, but it’s slightly tricky to achieve as IE won’t display a .ico file if you link to it from an img element, so you need to convert the images server-side. This undocumented Google API does that for you, meaning it’s much easier to add favicons as a feature to your site. # 30th August 2008, 8:40 pm

Shadowmaker. Upload a PNG with a transparent background and get back a shadow image suitable for use with the Google Maps API. # 10th December 2007, 3:45 pm

Google Chart API (via) Really neat charting API from Google—simply encode your chart data and configuration options in to a URL and Google will serve up a nicely rendered PNG. No API key required. It’s like a documented version of the Google Groups rounded corners API. # 6th December 2007, 5:37 pm