scijs / get-pixels

Reads an image into an ndarray
MIT License
543 stars 108 forks source link

Synchronous call? #29

Closed mertyildiran closed 8 years ago

mertyildiran commented 8 years ago

How can I make synchronous calls?

Like: var myImage = getPixels("image.png");

mikolalysenko commented 8 years ago

Not supported at the moment in order to maintain compatibility between browser and node APIs.

The problem is that on the browser you can't parse an image until you've waited at least one tick for the image parsing to complete.