Skip to content

Commit

Permalink
FIX: image's alpha channel not right
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbegin committed Mar 15, 2020
1 parent 5dba63a commit dfdb096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion runtime/image-utils.reds
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ image-utils: context [
src.h: as float! sh
size: rect.w * rect.h * 4
rgba: as int-ptr! allocate size
set-memory as byte-ptr! rgba #"^(FF)" size
set-memory as byte-ptr! rgba #"^(00)" size
i: 0 j: 0
loop rect.h [
i: 0
Expand Down
4 changes: 1 addition & 3 deletions runtime/platform/image-gdk.reds
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,7 @@ OS-image: context [
b: p/1
p/1: p/3
p/3: b
either alpha? [
p/4: #"^(FF)" - p/4
][
unless alpha? [
p/4: #"^(FF)"
]
dst/offset: old
Expand Down

0 comments on commit dfdb096

Please sign in to comment.