JuliaImages / QRCoders.jl

Creating QR Codes within Julia
https://juliaimages.org/QRCoders.jl/
MIT License
67 stars 11 forks source link

edit rule of unicodeplotbychar #40

Closed RexWzh closed 1 year ago

RexWzh commented 1 year ago

This PR is separated from #39 , since it is irrelevant of linear equations.

Changes:

  1. In unicodeplotbychar(mat), use the rule of QRCode instead.
  2. Minor change of the function imagebyerrcor
  3. Rename word ncodewords to necwords

Images are just matrices. In image convention, the value 1(true) represents a white space and 0(false) a black space. However, it is the opposite of QR codes.

Benchamark for newmat[inds] = targetval.(inds)

  1. cost: 12.476 ms (134839 allocations: 12.62 MiB)
  2. use .= instead: 12.501 ms (144559 allocations: 13.80 MiB)
codecov[bot] commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (42f9dce) compared to base (3ab2ab5). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #40 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 6 6 Lines 541 544 +3 ========================================= + Hits 541 544 +3 ``` | [Impacted Files](https://codecov.io/gh/JuliaImages/QRCoders.jl/pull/40?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages) | Coverage Δ | | |---|---|---| | [src/QRCoders.jl](https://codecov.io/gh/JuliaImages/QRCoders.jl/pull/40/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages#diff-c3JjL1FSQ29kZXJzLmps) | `100.00% <100.00%> (ø)` | | | [src/encode.jl](https://codecov.io/gh/JuliaImages/QRCoders.jl/pull/40/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages#diff-c3JjL2VuY29kZS5qbA==) | `100.00% <100.00%> (ø)` | | | [src/style.jl](https://codecov.io/gh/JuliaImages/QRCoders.jl/pull/40/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages#diff-c3JjL3N0eWxlLmps) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.