How to get height and width of image with Android Universal Image Loader?

余生颓废 提交于 2019-12-24 13:03:05

问题


How can I access the height and width of an image loaded using the Android Universal Image Loader?


回答1:


You can get Bitmap of image when image was loaded using ImageLoadingListener:

imageLoader.displayImage(imageUrl, imageView, [options], new SimpleImageLoadingListener() {
    @Override
    public void onLoadingComplete(Bitmap loadedImage) {
        int width = loadedImage.getWidth();
        int height = loadedImage.getHeight();
        //...
    }
});


来源:https://stackoverflow.com/questions/14331062/how-to-get-height-and-width-of-image-with-android-universal-image-loader

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!