I am trying to write the canvas of my White Board app to a file, but
it keeps saving blanks.

                mCanvas.save();
                //mCanvas.drawBitmap(mBitmap, 0, 0, null);

                           try {
                                  File myFile = new File("/sdcard/output.jpg");
                                 FileOutputStream fos =  new 
FileOutputStream(myFile);

                           mBitmap.compress(CompressFormat.JPEG, 75, fos);

                           fos.flush();
                           fos.close();
                           } catch (Exception e) {
                           Log.e("MyLog", e.toString());
                        }

This is probably due to the fact that the bitmap involved (mBitmap) is
only used to create a new canvas, and is therefore still blank when I
try to save it. How can I write the canvas back to the bitmap?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to