fixed getDataImage bug in chrome in demo code