Pixelator is an open source library that allows you to generate a HTML-only image (collection of pixels) from an image format (PNG, JPEG etc).