Skip to content
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

Add RenderQRCode example #17

Merged
merged 5 commits into from
Nov 30, 2021
Merged

Add RenderQRCode example #17

merged 5 commits into from
Nov 30, 2021

Conversation

antonfirsov
Copy link
Member

This example:

  • Demonstrates how to process an image row-by row with a real-life use-case
  • Demonstrates the usage of a non-default L8 pixel type, and saving the result to a GrayScale 1bpp PNG
  • May help users of the popular QRCoder library to mitigate the obsolation of System.Drawing in their own applications. (byte[,] pattern should be compatible with AbstractQRCode.QrCodeData.ModuleMatrix)
  • May help QRCoder to port the library to ImageSharp -- see System.Drawing.Common is deprecated on non-Windows platforms codebude/QRCoder#315

/cc @JimBobSquarePants @safern

@tocsoft
Copy link
Member

tocsoft commented Nov 7, 2021

I would suggest if the example is called "Render QR Code" we should probably just add a reference to a QR code library instead of hard coding some bitmap, otherwise its not really QR code rendering it just an example for twiddling pixels

Its not a useful sample for end users unless its actually end to end, most users won't be able to take this sample and actually wire it into QR code gen.

I feel this should really be split into 2 examples, 1 with a QRCoder dependency and one using ZXing.Net.

@antonfirsov
Copy link
Member Author

antonfirsov commented Nov 29, 2021

@tocsoft this is a reasonable suggestion, however in case of QRCoder I would end up implementing codebude/QRCoder#315 myself. It might be trivial job, but for case there are some unknown quirks, I'm unsure if it's the best investment of my time ATM. By providing a pixel twiddling example for now, we will help the library owners to solve the issue, and may also help some users to adapt a workaround, or just show how to manipulate pixels with less trivial example.

@JimBobSquarePants JimBobSquarePants merged commit 04a98d5 into master Nov 30, 2021
@JimBobSquarePants JimBobSquarePants deleted the af/qr branch November 30, 2021 06:51
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