Add ImageSharp renderers for .net 6.0, 5.0 and standart 2.0#460
Closed
AntonKorn wants to merge 1 commit intoShane32:masterfrom
Closed
Add ImageSharp renderers for .net 6.0, 5.0 and standart 2.0#460AntonKorn wants to merge 1 commit intoShane32:masterfrom
AntonKorn wants to merge 1 commit intoShane32:masterfrom
Conversation
Owner
|
I wouldn't endorse adding a third party (non-MS) dependency to the base QRCoder NuGet package. I would rather see something like PR #407 where there are separate packages depending on the needs of the user. |
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the ImageSharp cross platform library to the QRCoder. It helps to still use Base64QRCode and QRCode in linux or any other environment. New rederers are only included in .net 6.0, 5.0 and standart 2.0
In the project I am currently employed to we need the feature of generating Base64QRCode for different image types. And recently we added linux support. To still use this library we had to re-implement these classes by ourselves and with help of https://github.com/JPlenert/QRCoder-ImageSharp. Unfortunately we couldn't use the mentioned fork directly because of some internal concerns.
Breaking changes
ImageType enum was moved into the separate file from below the Base64QRCode class. Otherwise, changes were made backwar-compatible. Only new classes were added, old ones were left as is.
Test plan
Build QRCoderConsole project and go to the bin folder. Execute following command in net45, net5.0, net5.0-windows, net6.0-windows and compare the results.
.\QRCoderConsole.exe -p "Input text" -e Q -s 20 -o file.pngFollowing tool can be used: https://www.diffchecker.com/image-compare/. net45 needs to be compared with all the others.