To make code more flexible for advanced webapps, ImageAnalyzer should get Image object, not path to avoid doubled image loading in case of previous canvas usage. Eventually switch(typeof image) to select proper behaviour. Also in case of offline usage init should be executed at the end, as with local Apache setup onload may fire before all function are defined.
To make code more flexible for advanced webapps, ImageAnalyzer should get Image object, not path to avoid doubled image loading in case of previous canvas usage. Eventually switch(typeof image) to select proper behaviour. Also in case of offline usage init should be executed at the end, as with local Apache setup onload may fire before all function are defined.