Hi all,
I am using following code to get the Bitmap
I am getting the height and width of the Bitmap as 683 and 323. but the actual size of image is 3507 and 2480. is there any problem in the code.
I am using following code to get the Bitmap
Code:
try {
Log.e("src", imageURL);
URL url = new URL(imageURL);
// Create an http connection
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
BitmapFactory.Options options = new BitmapFactory.Options();
Bitmap myBitmap = BitmapFactory.decodeStream(input);
Log.d("SPen", "Bitmap height: " + myBitmap.getHeight() + ", Weight: " + myBitmap.getWidth());
} catch (IOException e) {
e.printStackTrace();
Log.d("Exception", e.getMessage());
}
I am getting the height and width of the Bitmap as 683 and 323. but the actual size of image is 3507 and 2480. is there any problem in the code.