title: How to rotate bitmap without changing file size?
body: <p>I try do this:</p>
  
  <pre><code>Bitmap bitmapOrg = BitmapFactory.decodeFile("/sdcard/"+ photoName + ".jpg");
  
          int width = bitmapOrg.getWidth();
          int height = bitmapOrg.getHeight();
  
          Matrix matrix = new Matrix();
  
          matrix.postRotate(90);
  
          Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width,
                  height, matrix, true);
  
          FileOutputStream os;
          try {
              os = new FileOutputStream(String.format(
                  "/sdcard/" + photoName + "-rotate.jpg",
                      System.currentTimeMillis()));
  
          resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 100, os);
  </code></pre>
  
  <p>rotated file size > original file size, because rotated file resolution = 96 dpi, but original file = 72 dpi. Why is this happening and how to fix it? </p>