meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 404 forks source link

Fixed base64 image input for NodeJS #136

Closed alexandru-g closed 9 years ago

alexandru-g commented 10 years ago

If you supplied the image buffer in base64 format instead of filepath, it was considered a filepath and it wasn't loaded (it checked if input was string, and they both are). If an Object is supplied as input image, it must contain the 'src' property from which the base64 string is taken from. You can either supply a Canvas Image object (it already has the 'src' property) or create a new object and set the property. I used this method to try not to break any previous functionality.