Skip to content

[WIP/QRCoder2] System.Drawing vs X #548

Open

Description

@codebude

Note: This issue is part of the planning of version 2 of the QRCoder. The meta-issue can be found here. These comments have been copied into this issue here, with the comments marked as such. If comments on the topic of this issue already exist in the meta thread, they have been copied here, naming the authors.

Topic - Part A

Should we keep System.Drawing.Common based renderers and add new ones with library 'X' or do we ditch System.Drawing.Common completely and replace it with library 'X'?

Topic - Part B

In past discussions, several libraries have been mentioned as replacements for System.Drawing. Among others ImageSharp (now partly has to be licensed?), SkiaSharp (native dependencies under Linux), Maui.Graphics or something else?

Activity

  1. added
    qrcoder2
    on May 26, 2024
  2. codebude commented on May 26, 2024

    @codebude
    CollaboratorAuthor

    Part A

    I suggest maintaining the existing code. While it's usefulness is likely declining, I see no reason to pitch the existing code. It will certainly be useful for existing users that wish to upgrade to 2.x, and serves as a template (if we like the design pattern) for SkiaSharp / ImageSharp / etc.

    Originally posted by @Shane32 here.

    Part B

    I suggest 'whatever contributors wish to offer PRs for'. Ideally:

    • System.Drawing.Common
    • SkiaSharp
    • ImageSharp 2.x
    • ImageSharp (latest)
    • Maui.Graphics

    Compare to ZXing.Net which has these NuGet packages available:

    • ZXing.Net.Bindings.Windows.Compatibility
    • ZXing.Net.Bindings.SkiaSharp
    • ZXing.Net.Bindings.ImageSharp
    • ZXing.Net.Bindings.ImageSharp.V2

    Originally posted by @Shane32 here.

  3. codebude commented on May 26, 2024

    @codebude
    CollaboratorAuthor

    ImageSharp is your friend.

    Originally posted by @catdsnny here.

  4. added this to the 2.0.0 milestone on Oct 2, 2025
  5. jeroenhabets commented on Jul 8, 2026

    @jeroenhabets

    SkiaSharp is MIT licensed, has a Nuget package for its linux native assets [1] and is actively maintained.

    For us it was the only viable alternative and we've been happily running SkiaSharp in production for over four years now. (ImageSharp has changed its licensed years ago. Maui still does not support Linux, and even Microsoft itself puts it lowest on its list of alternatives [2].)

    @Shane32 any plans to release a SkiaSharp version any time in the foreseeable future? It seems to move every now and then and then stall again, e.g. Streamlined/Slimmed-down Version 2..
    We'd love to be able to finally eliminate long out-of-support System.Drawing.Common and gdiplus [3] in line with our security policies.

    Last but not least: This all in full appreciation of your work and efforts! And in full realization we are in no position to make any demands. There is not much I can offer to help, but if we can help test a preview, please let us know.

    [1] https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux.NoDependencies/
    [2] https://learn.microsoft.com/en-gb/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only
    [3] mono/libgdiplus#744

  6. Shane32 commented on Jul 8, 2026

    @Shane32
    Owner

    Yes, certainly planned to separate the drawing libraries from the base library, so users can pick their drawing library of choice - or as is the case more often than not, eliminate all dependencies when a drawing package is not required.

  7. jeroenhabets commented on Jul 9, 2026

    @jeroenhabets

    @Shane32 any idea when those plans could bear fruit? Would you expect to release something later this year? (Just FYI only: For us having a full supported version on .Net10 and Linux is becoming more of a priority yet we can only contribute input and some testing)

    Furthermore I found some promising previous attempts [1][2], that are now Closed unmerged, but couldn't find an active branch, nor a separate folder or repo so I also wonder this new code lives (or will live).

    [1] PR #407 Adds Support for ImageSharp and SkiaSharp using two independent projects for maximum compatibility
    [2] PR #462 Use SkiaSharp to support SvgQRCode in .NET6

  8. cirrussys commented on Sep 29, 2026

    @cirrussys

    @Shane32 I was informed that for the part we use (PngByteQRCode) we could already eliminate System.Drawing.Common so our immediate (security/maintenance) driver is gone.
    Of course, it would be great if this would become more apparent in the packaging as you described (#548 (comment)).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    qrcoder2

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions