This is my android code:
InputStream input = getAssets().open("photo.jpg");
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeStream(input, null, options);
System.out.println("### img size: " + options.outWidth + "x" + options.outHeight);
But I found no matter how big of my image, it always print:
### img size: 100x100
Where is wrong?
UPDATE
It works fine after I re-deploying my application, but I modified nothing. It’s strange but I want to keep this question here, maybe it will appear someday again.
//Read Bitmap Dimensions and Type
Ref here:
//you didn’t assigned object name
The BitmapFactory class provides several decoding methods
(decodeByteArray(), decodeFile(), decodeResource(), etc.) for creating a Bitmap from various sources.