4

Is anyone aware of a JavaScript or jQuery library that enables the creation of Pixelart avatars? I'm hoping for something with a Mr. Potatohead style face creation using components and resulting in a GIF.

If not, I guess I'll need to make one myself.

AstroCB
  • 12,337
  • 20
  • 57
  • 73
danspants
  • 3,099
  • 3
  • 27
  • 33
  • 2
    This will be tricky, because JavaScript doesn't really support writing files. One option would be using a canvas, then rendering to a data URL with [toDataURL](http://www.w3.org/TR/html5/the-canvas-element.html#dom-canvas-todataurl). Both canvas and data URIs still have limited support, and this doesn't let you save a file directly. – Matthew Flaschen Sep 17 '10 at 00:41
  • Hey, did you gt any solution? If yes, do post about it so that it can help others. – w2lame Dec 02 '11 at 03:29
  • Why was this closed? This is a valid question to me! – kheya Jan 07 '15 at 01:52
  • @kheya Questions asking for software libraries are typically off-topic because they tend to generate spam and non-answers. I'm a bit conflicted about answering it myself, but I think I managed to refrain from the usual pitfalls of these types of questions. – AstroCB Jan 07 '15 at 01:53

1 Answers1

2

You could try Blockies.

Its usage is pretty simple (from the README):

var icon = blockies.create({ // All options are optional
    seed: 'randstring', // seed used to generate icon data, default: random
    color: '#dfe', // to manually specify the icon color, default: random
    bgcolor: '#aaa', // choose a different background color, default: white
    size: 15, // width/height of the icon in blocks, default: 10
    scale: 3 // width/height of each block in pixels, default: 5
});

where icon is a canvas element.

You can't really plan what you're going to get, though: you just end up with a random icon unless you specify a seed to generate it from.

AstroCB
  • 12,337
  • 20
  • 57
  • 73