Generate "data:" images in JavaScript.