android - 在android中使用Glide从图像中获取位图

标签 android bitmap imageview android-glide

我想使用 Glide 从图像中获取位图。我正在做以下事情-

Bitmap chefBitmap = Glide.with(MyActivity.this)
.load(chef_image)
.asBitmap()
.into(100, 100)
.get();

它曾经与以前的 Glide 版本一起工作。 但它不适用于 gradle - "compile 'com.github.bumptech.glide:glide:4.0.0'"

我想使用这个依赖,因为这是最新版本。

谁能在这方面帮助我。提前致谢。

最佳答案

Bitmap chefBitmap = Glide.with(MyActivity.this)
.asBitmap()
.load(chef_image)
.submit()
.get();

关于android - 在android中使用Glide从图像中获取位图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45750020/

相关文章:

android - 如何控制媒体播放器的音量

android - 如何在 Android 中创建弹出菜单

android - 只绘制 Drawable/Bitmap 的一部分

Android:使用 ImageView 显示 sdcard 中的 .jpg 图像

android - 将 EXIF 元数据写入 Android 中的图像

java - 如何将imageview绑定(bind)到数组索引mvvm javafx

android - CardView 的 OnClickListener?

android - 在保持位置的同时将列表项添加到顶部

java - 无法 Intent 下一个布局

android - Drawable 的深拷贝