Fail to load valid PNG file with encodeFormat and encodeQuality
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version**: 4.8.0
**Integration libraries**: nothing
**Device/Android Version**: issue on any device
**Issue details / Repro steps / Use case background**:
i'm trying to load an uncompressed PNG to bytes array. i was able to get a valid PNG with the Glide version 3 but the Glide version 4 give me a non valid PNG format
**Glide load line / `GlideModule` (if any) / list Adapter code (if any)**:
```
RequestOptions options = new RequestOptions()
.encodeFormat(CompressFormat.PNG)
.encodeQuality(0)
.override(800, 800)
.fitCenter();
Glide.with(this)
.as(byte[].class)
.apply(options)
.load(uriSelected)
.into(target);
```
it used to load valid PNG data with Glide 3 like this:
```
Glide.with(this)
.load(uriSelected)
.asBitmap()
.toBytes(CompressFormat.PNG, 0)
.override(800, 800)
.fitCenter()
.into(target);
```
Contributor guide
Assessment
This issue has not been assessed yet.