bumptech / bumptech/glide

Bitmap transforms not working when to resulting bitmap in the background

Open
#5,378 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

**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)**:
```kotlin
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),
)
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Kotlin load in the issue with Glide 4.12.0 on the reported Android setup, focusing on the chained bitmap transformation and synchronous submit().get() call. Trace how the resulting Bitmap is produced and verify whether MultiTransformation and circle crop are applied; done means the returned bitmap reflects the requested transformations.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.