refactorize to support exporting the img tag as JSON, useful maybe to generate backbone.js views in the client side
renamed method createImgJSON to createImg as it returns an object. renamed attr property to attibutes as Backbone.js views has
using Node.js Buffer capability to generate a base64 string instead of using base64EncodeOutputStream handcrafted function. I'm afraid it isn't a performance improvement :(
when createImg, as src is also an img attribute, it makes sense to return a single object with all attributes as properties
Merge pull request #2 from arturomtm/master

Support to obtain the image in an object (serializable in JSON format)