Skip to content

Commit

Permalink
fix: fix qrcode color detect
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWaWaR committed May 3, 2022
1 parent dc6620c commit 64b5395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ impl Image {
|| y < quite_width
|| x >= (width - quite_width)
|| y >= (width - quite_width)
|| !code[(
|| code[(
((x - quite_width) / point_width) as usize,
((y - quite_width) / point_width) as usize,
)];
)] == qrcode::Color::Light;
if is_white {
image::Rgb([0xFF, 0xFF, 0xFF])
} else {
Expand Down

0 comments on commit 64b5395

Please sign in to comment.