如何使用 Glide 转换从 Gallery 或 sdcard 加载到 ImageView 上的图像?

How to use Glide to transform the images loaded on an ImageView that came from the Gallery or sdcard?

所以我学会了如何使用 glide 从服务器加载图像并进行转换,效果很好。

但是现在,我想知道如何在将图像设置为 src 之前对已设置为 ImageView 的图像使用相同的转换?

您可以像处理来自服务器的图像一样使用它 Glide.with(context).load(uri).transform(new Transform()).into(view) 其中 uri 是图片的本地 uri,而 Transform 是您转换的 class。