Skip to content

Comments

Add SVG export with color options and matrix2svg; full roundtrip tests#57

Open
andreeco wants to merge 6 commits intoJuliaImages:masterfrom
andreeco:master
Open

Add SVG export with color options and matrix2svg; full roundtrip tests#57
andreeco wants to merge 6 commits intoJuliaImages:masterfrom
andreeco:master

Conversation

@andreeco
Copy link

@andreeco andreeco commented Aug 8, 2025

No description provided.

@RexWzh
Copy link
Member

RexWzh commented Aug 11, 2025

hi @andreeco, thanks for the contribution to this project! The SVG configuration looks great.

This repository hasn't been actively maintained for some time, and I just updated the workflow. The test errors are likely caused by dependency issues with ZBar.jl.

It would be great if you could help resolve this issue as well (perhaps in a separate PR), or I need some time to fix it myself before merging this PR.

@prittjam
Copy link

Can this be merged? The package has grown stale and there are compatibility issues. The pull request fixes these issues.

@andreeco
Copy link
Author

andreeco commented Aug 29, 2025

Sorry @RexWzh, I didn’t notice your post earlier. I’d be glad if you could take it on. You’re more familiar with the source code and have a better understanding of it and it's dependencies. The issue is that this depends on that, and that depends on this.

I can run the tests without errors, but I had to manually install some packages with apt.

     Testing Running tests...
Test Summary: | Pass  Broken  Total  Time
Decode mode   |   11       7     18  8.9s
Test Summary:                      | Broken  Total  Time
Same message by different encoding |      4      4  0.1s
Test Summary:                       | Pass  Broken  Total   Time
Same message with different setting |  232       8    240  11.1s
Test Summary:                        | Pass  Total  Time
locate QR matrix -- version & format |    7      7  1.9s
Test Summary:                       | Pass  Total  Time
locate QR matrix -- Function region |   48     48  0.5s
Test Summary:           | Pass  Total  Time
count pure message byte |    3      3  0.4s
Test Summary:      | Pass  Total  Time
general build test |    9      9  7.2s
Test Summary:  | Pass  Total   Time
simulate image |   10     10  18.8s
Test Summary:                      | Pass  Total  Time
simulate image -- score over masks |    2      2  0.3s
Test Summary:                        | Pass  Total  Time
simulate image -- test by QRDecoders |   10     10  1.9s
Test Summary: | Pass  Total  Time
Unicode plot  |    2      2  1.0s
Test Summary:   | Pass  Total  Time
locate msg bits |  202    202  0.6s
 ▄▄▄▄▄ █                          █▀▄█ ▄▄▄▄▄ 
 █   █ █                          █ ▀█ █   █ 
 █▄▄▄█ █▄            ▄▄▄          ▄▄▄█ █▄▄▄█ 
▄▄▄▄▄▄▄█ ▀ ▀ ▀ ▀ ▀ ▀ █▄█ ▀ ▀ ▀ ▀ ▀ ▀ █▄▄▄▄▄▄▄
▀  ▀ ▀▄ ▀                            ▀ ▀     
      ▄                                      
      ▄                                      
      ▄                                      
      ▄                                      
      ▄                                      
     ▄▄▄             ▄▄▄             ▄▄▄     
     █▄█             █▄█             █▄█     
      ▄                                      
      ▄                                      
      ▄                                      
      ▄                                      
      ▄                                      
█▀▀▀ █▄                                      
▄██▄▄█▄▄             ▄▄▄             ▄▄▄     
 ▄▄▄▄▄ █▄            █▄█             █▄█     
 █   █ █▄                                    
 █▄▄▄█ █                                     
       ▀▀                                    
Test Summary:                           | Pass  Total  Time
display -- use white modules in msgbits |    1      1  0.1s
Test Summary:                                       | Pass  Total  Time
Fill blank -- Gauss elimination vs Forney algorithm |    4      4  4.5s
Test Summary:                            | Pass  Total  Time
Generator matrix -- inverse of submatrix |  327    327  1.9s
Test Summary:    | Pass  Total  Time
Linear equations |    3      3  0.3s
Test Summary:                                 | Pass  Total  Time
Exporting a QR code to multiple file formats. |    2      2  0.4s
Test Summary:                               | Pass  Total  Time
Exporting all visible ISO-8859-1 characters |    1      1  0.1s
Test Summary:                               | Pass  Total  Time
Generating QR codes to test different masks |    1      1  1.0s
Test Summary:    | Pass  Total  Time
Generating masks |    1      1  0.3s
testimages/qrcode-Numeric-Low-versions.png created
testimages/qrcode-Alphanumeric-Low-versions.png created
testimages/qrcode-Byte-Low-versions.png created
testimages/qrcode-Numeric-Medium-versions.png created
testimages/qrcode-Alphanumeric-Medium-versions.png created
testimages/qrcode-Byte-Medium-versions.png created
testimages/qrcode-Numeric-Quartile-versions.png created
testimages/qrcode-Alphanumeric-Quartile-versions.png created
testimages/qrcode-Byte-Quartile-versions.png created
testimages/qrcode-Numeric-High-versions.png created
testimages/qrcode-Alphanumeric-High-versions.png created
testimages/qrcode-Byte-High-versions.png created
Test Summary:                                    | Pass  Total  Time
Generating QR codes to test with QR codes reader |    1      1  6.0s
Test Summary:                                  | Pass  Total  Time
Test set for error correction and interleaving |    1      1  0.1s
█▀▀▀▀▀▀▀█▀▀▀▀▀█▀▀▀▀▀▀▀█
█ █▀▀▀█ █▄█ ▀▄█ █▀▀▀█ █
█ █   █ █▄█ ▄▄█ █   █ █
█ ▀▀▀▀▀ █▀▄ █▀█ ▀▀▀▀▀ █
█▀█▀▀█▀▀▀▄▄▀███▀██▀█▀▀█
█▀▀ ▄▀▀▀▄▀▄▄█  ▄ ▄▄▄▀ █
██▄  ▄▄▀ ██▄▀▄▀▀▄█▄█▄▀█
█▀▀▀▀▀▀▀█ ▄ ▄█▀   █▄█▄█
█ █▀▀▀█ █▄ ▄ ▄▄█▄█  ▀██
█ █   █ █ █▄█ █▄▀█▄ ▄██
█ ▀▀▀▀▀ █▀▄▀ █   ▄█▀█▄█
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Test Summary:      | Pass  Total  Time
struct type QRCode |   80     80  4.6s
Test Summary:                  | Pass  Total  Time
Generate QRCode -- small cases |    5      5  0.0s
Test Summary:                  | Pass  Total  Time
Generate QRCode -- large cases |    5      5  0.0s
┌ Warning: keyword `targetsize` will be removed in the future, use `pixels` instead
│   caller = exportqrcode(message::String, path::String; eclevel::Medium, version::Int64, mode::Numeric, mask::Int64, width::Int64, compact::Bool, targetsize::Int64, pixels::Int64) at export.jl:150
└ @ QRCoders ~/.julia/dev/QRCoders.jl/src/export.jl:150
┌ Warning: keyword `targetsize` will be removed in the future, use `pixels` instead
│   caller = ip:0x0
└ @ Core :-1
Test Summary:                       | Pass  Total  Time
Generate QRCode -- image extensions |   17     17  5.2s
Test Summary:                      | Pass  Total  Time
Generate QRCode -- animated images |    7      7  1.5s
Test Summary:                     | Pass  Total  Time
Generate QRCode -- demo (Numeric) |    5      5  0.1s
Test Summary:  | Pass  Total  Time
Encoding modes |    7      7  0.0s
Test Summary:                         | Pass  Total  Time
Capacity of the QRCode -- getversion  |   20     20  0.3s
Test Summary:                    | Pass  Total  Time
Encode data -- message into bits |    4      4  0.1s
Test Summary:           | Pass  Total  Time
Indicator and pad codes |    5      5  0.1s
Test Summary:      | Pass  Total  Time
Byte VS UTF8 mode  |    4      4  0.2s
Test Summary:              | Pass  Total  Time
penalty of different masks |   17     17  2.3s
Test Summary:                       | Pass  Total  Time
test for versioninfo and formatinfo |   68     68  0.2s
Test Summary:      | Pass  Total  Time
Euclidean division |    9      9  0.6s
Test Summary:    | Pass  Total  Time
Basic operations |   34     34  1.6s
Test Summary:                            | Pass  Total  Time
Tests for polynomials and error encoding |   22     22  0.8s
Test Summary:    | Pass  Total  Time
Generator matrix |    9      9  0.4s
Test Summary: | Pass  Total  Time
exportsvg     |   18     18  0.3s
Test Summary:                    | Pass  Total  Time
SVG roundtrip decode (exportsvg) |    1      1  0.2s
Test Summary:                     | Pass  Total  Time
SVG roundtrip decode (matrix2svg) |    1      1  0.1s
█████████████████████████████████
██ ▄▄▄▄▄ █▀▄█▀ █  ▀ ▄▄██ ▄▄▄▄▄ ██
██ █   █ █▄   ▄█ ▀█▄▀█▄█ █   █ ██
██ █▄▄▄█ █ ▀█▀█▄▀  █▄▀██ █▄▄▄█ ██
██▄▄▄▄▄▄▄█ ▀▄█ █▄█▄▀ █ █▄▄▄▄▄▄▄██
██▄ ▀▄▀█▄▄██ ▀█  ▄ ▄██ █ ▄▄▀▄▄▀██
██ ▀ ▀▀█▄█ ▄▄██▀▄█▄█ ▄ ▄██ ▄  ███
███ ▄▄ ▀▄ ▄█▀▀  ▄▀▄▄█▄  ▄██▄█▄▄██
██▄█▄█▄▄▄▄▄▀▀█  ▄█▄ ▀█ ▀ ▄▄ ▄ ▄██
███▄█ ▀▀▄▄█▀▄▄██▀▀ ▄██ ▀▀ █▀█▄▀██
██▄█ ▄▄▀▄ ▄ ▄▀█▄▄▀▀▀ █▀ █  ██  ██
██▄████▄▄▄ ▄   ▄▄▀▀▀█  ▄▄▄ █ ▀▀██
██ ▄▄▄▄▄ █▄█    ▀█ ▄▀█ █▄█ ▀▀ ▀██
██ █   █ █▀ █ █▀▄▄  █▀ ▄   ▀▀▀███
██ █▄▄▄█ █▀   █▄▄██ ▀  ▀██ ▄▄▀▄██
██▄▄▄▄▄▄▄█▄█▄█▄▄██▄▄██▄▄▄▄▄▄█▄███
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
     Testing QRCoders tests passed 

I’m using your code in my package OneTimePasswords, which is part of an authentication plugin I’m likely to publish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants