glide
glide copied to clipboard
Bitmap transforms not working when to resulting bitmap in the background
trafficstars
Glide Version: 4.12.0
Integration libraries: OkHttp 4.11.0
Device/Android Version: Galaxy S21 Ultra
Issue details / Repro steps / Use case background: I'm trying to load an image from a URL as a bitmap in the background and apply a MultiTransformation but the transformations don't get applied. This also is also the case for things like circle crop. I'm wondering if there is a way to get the transform to apply to the resulting bitmap or if I'm going to have to find another approach.
Glide load line / GlideModule (if any) / list Adapter code (if any):
fun getBlurredImage(imageUrl: String?): Bitmap =
Glide.with(context)
.asBitmap()
.load(imageUrl)
.apply(RequestOptions.bitmapTransform(createBlurTransformation(context)))
.submit()
.get()
private fun createBlurTransformation(context: Context) = MultiTransformation(
ColorFilterTransformation(ContextCompat.getColor(context, R.color.opac_b_9)),
BlurTransformation(BLUR_TRANSFORMATION_BLUR_RADIUS, BLUR_TRANSFORMATION_SAMPLING),
)