Saturday, March 9, 2013

Saving an image on the mobile android phone

make a bitmap also from decodestream say photo2

 mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(               Environment.DIRECTORY_PICTURES), "your apps name");      mediaFile = new File(mediaStorageDir.getPath() + File.separator +                  "Image" + num + ".png"); // make a int num and save it and         try {                      //add it to the file name, increment for every                                      //save that you do             fOut = new FileOutputStream(mediaFile);         } catch (FileNotFoundException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }           photo2.compress(Bitmap.CompressFormat.PNG, 100,fOut); 

Source: http://stackoverflow.com/questions/15283285/saving-an-image-on-the-mobile-android-phone

andy williams andy williams Lady Gaga New Girl Avalanna Gigi Chao Jimmy Hoffa

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.