code: public static Point getSize(String path) {
          BitmapFactory.Options options = new BitmapFactory.Options();
          options.inJustDecodeBounds = true;
          BitmapFactory.decodeFile(path, options);
          int width = options.outWidth;
          int height = options.outHeight;
          return new Point(width, height);
      }
docs: Get width and height of the bitmap specified with the file path.
  @param path the bitmap file path.
  @return the size.