I want to reduce the image size while saving it to local folder. Now it is stored with its original size. I am storing the whole bitmap to path as below:
String fileName = "image_" + count++ + ".png";
System.out.println("file name is : " + fileName);
File sd = Environment.getExternalStorageDirectory();
File folder = new File(sd + "/Wallpaper Pack");
System.out.println("folder is : " + folder);
folder.mkdir();
File dest = new File(folder, fileName);
try {
FileOutputStream out;
out = new FileOutputStream(dest);
bitmap.compress(Bitmap.CompressFormat.PNG, 50, out);
out.flush();
out.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}