Skip to content

Add Micro QR code support #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1c87314
Split QRCodeGenerator further
Shane32 Apr 6, 2025
e10801d
update
Shane32 Apr 6, 2025
5d16dca
update
Shane32 Apr 6, 2025
f3d17c7
update
Shane32 Apr 6, 2025
5941456
update
Shane32 Apr 6, 2025
6b57a3f
update test
Shane32 Apr 6, 2025
7546d16
update
Shane32 Apr 6, 2025
5a97eb2
update
Shane32 Apr 7, 2025
ae3d1c2
update
Shane32 Apr 12, 2025
ddb443c
Separate GaloisField from CapacityTables
Shane32 Apr 12, 2025
e6fc48f
update
Shane32 Apr 12, 2025
4bd7227
remove using
Shane32 Apr 12, 2025
cca83ad
Progress
Shane32 Apr 13, 2025
e71760b
update format information writing for micro codes
Shane32 Apr 13, 2025
6e9048e
Update
Shane32 Apr 14, 2025
defb582
Update api approvals
Shane32 Apr 14, 2025
cb663d8
update
Shane32 Apr 14, 2025
e759337
progress
Shane32 Apr 14, 2025
696dc86
Fix ECC for M1 and M3 sizes
Shane32 Apr 16, 2025
faac596
Update QRCoder/QRCodeGenerator/GaloisField.cs
Shane32 Apr 16, 2025
f418922
Merge branch 'split' into micro
Shane32 Apr 16, 2025
ec828eb
update
Shane32 Apr 19, 2025
c7a71b1
update
Shane32 Apr 19, 2025
2ce2182
update
Shane32 Jun 2, 2025
a3da262
update
Shane32 Jun 2, 2025
8f351cb
Update QRCoder/QRCodeGenerator.cs
Shane32 Jun 2, 2025
9f59ef1
update
Shane32 Jun 2, 2025
4443236
Update QRCoder/QRCodeGenerator.cs
Shane32 Jun 2, 2025
80c32b7
Update QRCoder/QRCodeGenerator.cs
Shane32 Jun 2, 2025
8358a58
Update QRCoder/QRCodeGenerator.cs
Shane32 Jun 2, 2025
1754386
update
Shane32 Jun 13, 2025
da21485
update
Shane32 Jun 13, 2025
01fb702
update
Shane32 Jun 13, 2025
69f8920
update
Shane32 Jun 13, 2025
f6a3982
update
Shane32 Jun 13, 2025
bbc8b57
Fix CI
Shane32 Jun 17, 2025
b586d66
update
Shane32 Jun 17, 2025
b24ed5a
Merge branch 'fixci2' into micro
Shane32 Jun 17, 2025
7667473
a
Shane32 Jun 17, 2025
c94561b
a
Shane32 Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/wf-build-release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
Expand All @@ -33,17 +33,17 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

test:
needs: build
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -139,15 +139,15 @@ jobs:

pack-push-ci:
needs: test
runs-on: windows-2019
runs-on: windows-latest
env:
GH_PKG_SEC: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
clean:
needs: [build, test, pack-push-ci]
if: always()
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v5
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/wf-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
required: true
jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
Expand All @@ -34,17 +34,17 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

test:
needs: build
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -139,15 +139,15 @@ jobs:

pack-push-release:
needs: test
runs-on: windows-2019
runs-on: windows-latest
env:
GH_PKG_SEC: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
clean:
needs: [build, test, pack-push-release]
if: always()
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v5
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wf-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
Expand All @@ -33,17 +33,17 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

test:
needs: build
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
path: ${{ github.workspace }}

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
clean:
needs: [build, test]
if: always()
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v5
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/wf-verify-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ on:

jobs:
format:
runs-on: windows-2019
runs-on: ubuntu-latest
env:
EnableWindowsTargeting: true
steps:
- uses: actions/checkout@v4
name: Checkout Code

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2.0.x
5.0.x
6.0.x
8.0.x
dotnet-version: 8.0.x

- name: Restore NuGet Packages
run: dotnet restore
Expand Down
6 changes: 4 additions & 2 deletions QRCoder/QRCodeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ public void SaveRawData(string filePath, Compression compressMode)
/// <summary>
/// Gets the number of modules per side from the specified version.
/// </summary>
/// <param name="version">The version of the QR code.</param>
/// <param name="version">The version of the QR code (1 to 40, or -1 to -4 for Micro QR codes).</param>
/// <returns>Returns the number of modules per side.</returns>
private static int ModulesPerSideFromVersion(int version)
=> 21 + (version - 1) * 4;
=> version > 0
? 21 + (version - 1) * 4
: 11 + (-version - 1) * 2;

/// <summary>
/// Releases all resources used by the <see cref="QRCodeData"/>.
Expand Down
Loading