我使用位图从URL获取图像
public void loadImage(String url){
try {
bitmap = BitmapFactory.decodeStream((InputStream)new URL(url).getContent());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
无论如何我可以从这里调整图像大小吗?设置它的宽度和高度仍然保持分辨率?