Skip to content

Commit dfdb096

Browse files
committed
FIX: image's alpha channel not right
1 parent 5dba63a commit dfdb096

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

runtime/image-utils.reds

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ image-utils: context [
219219
src.h: as float! sh
220220
size: rect.w * rect.h * 4
221221
rgba: as int-ptr! allocate size
222-
set-memory as byte-ptr! rgba #"^(FF)" size
222+
set-memory as byte-ptr! rgba #"^(00)" size
223223
i: 0 j: 0
224224
loop rect.h [
225225
i: 0

runtime/platform/image-gdk.reds

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ OS-image: context [
296296
b: p/1
297297
p/1: p/3
298298
p/3: b
299-
either alpha? [
300-
p/4: #"^(FF)" - p/4
301-
][
299+
unless alpha? [
302300
p/4: #"^(FF)"
303301
]
304302
dst/offset: old

0 commit comments

Comments
 (0)