Skip to content

Commit

Permalink
Fix spec misunderstanding (closes #1).
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuenzli committed Jan 24, 2023
1 parent 7ff7f01 commit ebbed73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qoic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ let decode_pixels src ~channels dst =
else
assert false
in
loop 0 qoi_header_length 0 0 0 0 0xFF
let r = 0 and g = 0 and b = 0 and a = 0xFF in
Index.set index ~color_idx:(Index.color_idx r g b a) r g b a;
loop 0 qoi_header_length 0 r g b a

let decode ?channels src =
try
Expand Down

0 comments on commit ebbed73

Please sign in to comment.