bumptech / bumptech/glide

sizeMultiplier has no effect

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

Description

Here's a test case that will fail:

`````
@RunWith(AndroidJUnit4.class)
public class ScalingWorksTest {

@Test
public void testScalingWorks() throws Exception {
Context appContext = InstrumentationRegistry.getTargetContext();

Bitmap original = Glide.with(appContext)
.asBitmap()
.load(R.raw.people)
.submit()
.get();

Bitmap scaled = Glide.with(appContext)
.asBitmap()
.apply(RequestOptions.sizeMultiplierOf(0.5f))
.load(R.raw.people)
.submit()
.get();

assertNotEquals(original.getWidth(), scaled.getWidth());
assertNotEquals(original.getHeight(), scaled.getHeight());
}
}
`````

I would expect the second Bitmap to be scaled to half the size of the first, but it is the same size.

**Glide Version**: 4.3.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.