byte[] imageByte=getImageFromURL(urlPath.trim());
//以下是把图片转化为缩略图再加载
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeByteArray(imageByte, 0, imageByte.length,options); <span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25px; white-space: normal;"> //此时返回bitmap为空 </span>
options.inJustDecodeBounds = false;
int be = (int)(options.outHeight / (float)200);
if (be <= 0){
be = 1;
}
options.inSampleSize = be;
return BitmapFactory.decodeByteArray(imageByte, 0, imageByte.length,options); //返回缩略图