一、根据网络数据流来获取大小
class GetImageSizeTask extends AsyncTask<Void, Void, Boolean> {
String TAG = this.getClass().getName();
String urlStr = "http://www.3dmgame.com/uploads/allimg/160902/328_160902163518_1.jpg";
int width, height;
@Override
protected Boolean doInBackground(Void... voids) {
boolean result = false;
try {
URL mUrl = new URL(urlStr);
HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection();
Inp