diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-05-01 13:16:47 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-05-01 13:16:47 +0200 |
| commit | a02bcd3bfdb0a12a4aa19bf45764f6b011e551de (patch) | |
| tree | aba4628bf2d87d5f43dc03e2e10c845876d3cac1 | |
| parent | 0e972296a48791f87ef656e621816c571e0cd822 (diff) | |
PNG: Fix test for when premultiplication is needed.
| -rw-r--r-- | core/image/png/png.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/image/png/png.odin b/core/image/png/png.odin index c8dcd24a3..8a6729484 100644 --- a/core/image/png/png.odin +++ b/core/image/png/png.odin @@ -731,7 +731,7 @@ load_from_stream :: proc(stream: io.Stream, options := Options{}, allocator := c `.blend_background` and `seen_bkgd` if we haven't seen both. */ if !(seen_bkgd && .blend_background in options) { - options ~= {.blend_background}; + options -= {.blend_background}; seen_bkgd = false; } @@ -748,7 +748,7 @@ load_from_stream :: proc(stream: io.Stream, options := Options{}, allocator := c } add_alpha := (seen_trns && .alpha_drop_if_present not_in options) || (.alpha_add_if_missing in options); - premultiply := .alpha_premultiply in options || .blend_background in options; + premultiply := .alpha_premultiply in options || seen_bkgd; img.channels = out_image_channels; |