meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation

Home Page:http://camanjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JPG: "Image given has not completed loading"

lapidus opened this issue · comments

I am experiencing a somewhat odd issue ...
For JPG images (such as the attached one) that was downloaded with nodejs (fs.writeFile), Caman gives this error:

Image given has not completed loading
    at Caman.finishInit /node_modules/caman/dist/caman.full.js:463:22
    at Caman.nodeFileReady /node_modules/caman/dist/caman.full.js:372:19
    at node_modules/caman/dist/caman.full.js:7:61
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:416:3)

If I open this image in the browser and resave it, Caman will not produce any errors. Hence I suspect there is some kind of "JPG header" that Caman needs to interpret the JPG properly?
Did anyone else try Caman on a .jpg that was created via fs.writefile? Any ideas appreciated ...

0ab695ba-6994-11d7-ae76-0004755038ce

Is anyone working on this ?