I want to draw an image on canvas in the Cordova application.
When the image path is in the www directory of my application, the image works as expected. However, if the image was taken by the Cordoba camera and thus saved to ../../tmp with respect to the www directory, drawImage(...) creates a black image.
This could be a security issue because the source code for the application is in the www directory, but there are no images. On the other hand, the <img> can display these images without problems.
Is the problem really a security issue? And what can I do to solve the problem, i.e. Do not create a black picture?
javascript cordova canvas drawimage code-access-security
Clawish
source share