I load an image from the resource folder to draw on the map as an overlay. In my try-catch statement, I am trying to load an image, otherwise return null.
What I do not understand, after re-entering the code, it returns to the load line again and again and fails, returning null, but for some reason, despite the return of the zero image, the image is really loaded correctly and with a picture ... ??
If I run the program in normal mode, it loads the image and displays it correctly, as expected, but the function still returns an empty bitmap every time. Did I miss something?
Here is the code I use to upload the image:
BitmapFactory.decodeStream(myActivity.getAssets().open("squirrel.jpg"));
Edit: I tried another random image, this time .png, and it still does the same, but it still loads and draws correctly.
Jamie source share