1.0.0
·
102 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Announcing Release of 1.0.0
Highlights
- Faster encoding, SIMD-accelerated Reed–Solomon (GFNI / SSSE3 / ARM AdvSimd / NEON), bit-parallel module placement, optimized masking, and tighter allocation patterns across the encode pipeline.
- Zero-allocation encoding,
CreateQrCode(..., Span<byte> destination)writes the module matrix into a caller-provided buffer with no per-encode heap allocation. - Decoding,
QRCodeDecoderreads QR codes from module matrices and from images (rotation, mirroring, inverted palettes; Reed–Solomon error correction included).
Overview
- Major encode-path performance work (ECC, interleaving, bit packing, data placement, masking).
- SVG output API,
GetSvgString(),GetSvgBytes(),SaveSvg(),SaveToSvg(),ToSvgString()onQRCodeImageBuilder(all styling options supported). QrCodeclass removed, deprecated since 0.9.0; useQRCodeImageBuilderinstead.WithModulePixelSize()andWithVersion()for sharper module-aligned output and logo placement.- Browser Playground (WebAssembly): https://guitarrapc.github.io/SkiaSharp.QrCode/
- Update SkiaSharp dependencies to
4.148.0
Usage
Quick start (PNG / SVG)
using SkiaSharp.QrCode.Image;
File.WriteAllBytes("qrcode.png", QRCodeImageBuilder.GetPngBytes("https://example.com"));
File.WriteAllText("qrcode.svg", QRCodeImageBuilder.GetSvgString("https://example.com"));Zero allocation encode
var calculated = QRCodeGenerator.GetRequiredBufferSize("content", ECCLevel.M);
var buffer = ArrayPool<byte>.Shared.Rent(calculated.BufferSize);
try
{
var written = QRCodeGenerator.CreateQrCode("content", ECCLevel.M, buffer);
var matrix = buffer.AsSpan(0, written); // 0 = light, 1 = dark, row-major
}
finally
{
ArrayPool<byte>.Shared.Return(buffer);
}Decode
// From generated data (round-trip)
var qrData = QRCodeGenerator.CreateQrCode("content", ECCLevel.M);
if (QRCodeDecoder.TryDecode(qrData, out var text))
Console.WriteLine(text);
// From an image
using var bitmap = SKBitmap.Decode("qr.png");
if (QRCodeDecoder.TryDecode(bitmap, out var text, out var info))
Console.WriteLine($"{text} (v{info.Version}, ECC {info.EccLevel})");Migration
The obsolete QrCode class has been removed in 1.0.0. Replace it with QRCodeImageBuilder.
See the Migration Guide for before/after examples (stream output, format/quality, overlays, and default ECC level change: QrCode used ECCLevel.L, QRCodeImageBuilder defaults to ECCLevel.M).
What's Changed
- chore(deps): bump actions/checkout from 5.0.0 to 6.0.1 by @dependabot[bot] in #283
- chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0 by @dependabot[bot] in #285
- chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 by @dependabot[bot] in #284
- chore: add Net.Codecrete.QrCodeGenerator benchmark by @guitarrapc in #286
- chore: Adds SBOM generation by @guitarrapc in #287
- ci: Adds SLSA provenance attestation by @guitarrapc in #288
- chore(deps): bump actions/attest-build-provenance from 3.0.0 to 3.1.0 by @dependabot[bot] in #289
- chore(deps): bump actions/attest-build-provenance from 3.1.0 to 3.2.0 by @dependabot[bot] in #290
- chore(deps): bump actions/stale from 10.1.0 to 10.2.0 by @dependabot[bot] in #291
- Update CodeQL action versions and config file by @guitarrapc in #293
- chore(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 in the dependencies group by @dependabot[bot] in #295
- chore(deps): bump the dependencies group with 2 updates by @dependabot[bot] in #297
- chore(deps): bump github/codeql-action from 4.32.5 to 4.35.1 in the dependencies group by @dependabot[bot] in #298
- chore(deps): bump NuGet/login from 1.1.0 to 1.2.0 in the dependencies group by @dependabot[bot] in #300
- chore(deps): bump the dependencies group across 1 directory with 3 updates by @dependabot[bot] in #307
- chore(deps): bump actions/checkout from 6.0.1 to 7.0.0 in the dependencies group by @dependabot[bot] in #308
- ci: add pr harness by @guitarrapc in #309
- Update to SkiaSharp v4.148.0 by @chris-rickman in #306
- Upgrade Codecrete generator to v3 by @manuelbl in #302
- fix: FinderPattern background was fixed to White by @guitarrapc in #310
- feat: add AddVersion to QRCodeImageBuilder by @guitarrapc in #311
- feat: Add Pixel per module sizing support by @guitarrapc in #312
- feat: Specify QR Size by WithSize when using WithModuleSize by @guitarrapc in #313
- feat: Improve EccBinaryEncoder applying for scalar, SSSE3 and GFNI by @guitarrapc in #314
- feat: Rewrite QR mask pattern selection from byte-per-module processing to a bit-packed pipeline by @guitarrapc in #315
- chore: remove QrCode class as announced by @guitarrapc in #316
- feat: improve memory allocation during creating QRCodeData by @guitarrapc in #317
- feat: Optimized QR data placement with 64-bit buffering, paired module processing, and bounds-check elimination. by @guitarrapc in #318
- feat: Faster interleaving via sequential writes, branchless column loops, and a single-block copy fast path. by @guitarrapc in #319
- fix Incorrect handling for Count Indicator/buffer overflow against ISO/IEC 18004 by @guitarrapc in #321
- feat: Rewrite BitWriter around an MSB-first ulong accumulator with bulk 32/64-bit stores, and update QRBinaryEncoder to use the faster write, flush, and pad paths. by @guitarrapc in #320
- refactor: remove Galois dead code for constants by @guitarrapc in #322
- feat: Bake GFNI initial table construction for cold start by @guitarrapc in #323
- feat: add NEON (macOS, ARM64) improvement for EccBinaryEncoder by @guitarrapc in #324
- feat: add 0alloc CreateQrCode API to use caller provided Span by @guitarrapc in #325
- feat: add WASM Playground by @guitarrapc in #326
- docs: move docs from README by @guitarrapc in #327
- feat: Performance improvement for Skia image generation by @guitarrapc in #328
- feat: add SVG API support by @guitarrapc in #329
- feat: adjust svg api and playground support by @guitarrapc in #330
- feat: add QRCode decode functionality, matrix & image pipeline with Reed-Solomon error correction by @guitarrapc in #331
- feat: improve FinderPatternFinder performance by Simd by @guitarrapc in #332
- feat: improve otsu histogram construction to pixel runs aggregation by @guitarrapc in #333
- feat: refine Blazor by @guitarrapc in #334
New Contributors
- @chris-rickman made their first contribution in #306
- @manuelbl made their first contribution in #302
Full Changelog: 0.12.0...1.0.0