bumptech / bumptech/glide

GlideImage: BiasAlignment ignored with ContentScale.Crop

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

Description

To reproduce:

```
GlideImage(
model = "https://connyduck.at/gradient.png",
contentDescription = null,
contentScale = ContentScale.Crop,
alignment = BiasAlignment(-1f, -1f),
modifier = Modifier.aspectRatio(1f),
)
```

Expected Result:

Image

Actual Result:

Image

Interestingly, it works with `ContentScale.Fit`.

Contributor guide

Open the contributing guide

Research direction

Start at the GlideImage entry point and reproduce the supplied example with ContentScale.Crop and BiasAlignment(-1f, -1f), comparing it with ContentScale.Fit. Trace how alignment is applied during cropping; done means the crop honors the requested bias while the existing Fit behavior remains correct.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.