Skip to content

Add ability to control alpha pre-multiplication#569

Merged
colinrtwhite merged 3 commits into
coil-kt:masterfrom
romainguy:rg/premultiplied_alpha
Oct 30, 2020
Merged

Add ability to control alpha pre-multiplication#569
colinrtwhite merged 3 commits into
coil-kt:masterfrom
romainguy:rg/premultiplied_alpha

Conversation

@romainguy
Copy link
Copy Markdown
Contributor

@romainguy romainguy commented Oct 29, 2020

The new ImageRequest API maps to the equivalent API in BitmapFactory.Options and ImageDecoder.
This PR addresses issue #568.

The new ImageRequest API maps to the equivalent API in BitmapFactory.Options
and ImageDecoder.
Comment thread coil-base/src/main/java/coil/request/DefaultRequestOptions.kt Outdated
val allowHardware: Boolean,

/** @see Builder.allowHardware */
/** @see Builder.allowRgb565 */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Comment thread coil-base/src/main/java/coil/decode/Options.kt
@colinrtwhite
Copy link
Copy Markdown
Member

Looks good - thanks for adding this! Left a few comments.

…ested

during code review.

Add a new constructor and a new copy method to Options to maintain binary
compatibility.
Copy link
Copy Markdown
Member

@colinrtwhite colinrtwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@colinrtwhite colinrtwhite merged commit e634836 into coil-kt:master Oct 30, 2020
@romainguy romainguy deleted the rg/premultiplied_alpha branch October 30, 2020 22:49
colinrtwhite pushed a commit that referenced this pull request Oct 5, 2022
* Add ability to control alpha pre-multiplication

The new ImageRequest API maps to the equivalent API in BitmapFactory.Options
and ImageDecoder.

* Don't add premultipliedAlpha to Default/DefinedRequestOptions as suggested
during code review.

Add a new constructor and a new copy method to Options to maintain binary
compatibility.

* Fix formatting issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants