============ Problem Description ============
Use the following code to read the image inside the SD card and display it
Setbackgrounddrawable (New Bitmapdrawable (Bitmapfactory.decodefile ("/storage/sdcard/bg.jpg"));
Then the graffiti, after the completion of the graffiti to save, leaving only the graffiti of my strokes, the background map is not saved
because it is graffiti on the background map, how to make graffiti and background map to save
Save the Code:
Mycanvas.save (Canvas.all_save_flag); Mycanvas.restore (); File F = new file ("/storage/sdcard/", "bg.jpg"); if (f.exists ()) {f.delete (); }fileoutputstream fos = null;try {fos = new FileOutputStream (f); mybitmap.compress (Bitmap.CompressFormat.JPEG, N, FOS); try {Fos.flush ();} catch (IOException e) {//TODO auto-generated catch Blocke.printstacktrace ();} try {fos.close ();} catch (IOException e) {//TODO auto-generated catch Blocke.printstacktrace ();}} catch (FileNotFoundException e) {//TODO auto-generated catch Blocke.printstacktrace ();}
============ Solution 1============
You can load a historical background image before saving the canvas, and then load the interface you want to save so that you can save the
Android Canvas read background image, after doodle save