Simon Willison’s Weblog

Subscribe
Atom feed for png

8 items tagged “png”

2024

Parsing PNG images in Mojo (via) It’s still very early days for Mojo, the new systems programming language from Chris Lattner that imitates large portions of Python and can execute Python code directly via a compatibility layer.

Ferdinand Schenck reports here on building a PNG decoding routine in Mojo, with a detailed dive into both the PNG spec and the current state of the Mojo language.

# 12th May 2024, 8:17 pm / png, python, mojo

2010

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 / images, node, png, recovered, jpeg, peteris-krumins

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 / calhenderson, gzip, png, recovered

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 / compression, github, hacks, javascript, png, recovered, 10kapart, alex-le

2009

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 / ico, images, pil, png, python, vista, windows

2008

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 / apis, favicon, google, png, undocumented

2007

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-maps, google-maps-api, png, shadowmaker

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 / apis, charting, google, graphics, png