i am try to make resize image but when resize to get low resolution image. is there other solution to image resize in andorid using java code.
       BitmapFactory.Options options = new BitmapFactory.Options();
            options.inSampleSize = 4;
          Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath(), options);
            int h = 300;
            int w = 300;
            Bitmap scaled = Bitmap.createScaledBitmap(myBitmap, h, w, true);
            String root = Environment.getExternalStorageDirectory()
                    .toString();
            File myDir = new File(root + "/upload_images");
            myDir.mkdirs();
            String fname = null;
            if (rname == null) {
                fname = "Image.jpg";
            } else {
                fname = rname + ".jpg";
                Log.i("log_tag", "File anem::" + fname);
            }
            file = new File(myDir, fname);
            Log.i("log_tag", "" + file);
            if (file.exists())
                file.delete();
            try {
                FileOutputStream out = new FileOutputStream(file);
                scaled.compress(Bitmap.CompressFormat.JPEG, 90, out);
                out.flush();
                out.close();
 
     
    