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 ImageSharp renderers for .net 6.0, 5.0 and standart 2.0 #460

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AntonKorn
Copy link

@AntonKorn AntonKorn commented Jul 1, 2023

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.png

Following tool can be used: https://www.diffchecker.com/image-compare/. net45 needs to be compared with all the others.

@Shane32
Copy link
Contributor

Shane32 commented Apr 20, 2024

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.

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.

None yet

2 participants