Skip to content

Commit d256393

Browse files
authored
Merge pull request #507 from codebude/feature/update-readmes-202404
Readme.md update: Clarification on dependencies and removed PCL note
2 parents c9464b8 + cc8d8cf commit d256393

File tree

2 files changed

+14
-28
lines changed

2 files changed

+14
-28
lines changed

QRCoder/Assets/nuget-readme.md

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## About
22

3-
QRCoder is a simple library, written in C#.NET, which enables you to create QR codes. It hasn't any dependencies to other libraries and is available as .NET Framework and .NET Core PCL version on NuGet.
3+
QRCoder is a simple library, written in C#.NET, which enables you to create QR codes. It hasn't any dependencies to external libraries<sup>1</sup>, is available as package on NuGet and supports .NET Framework, .NET Core, .NET Standard and .NET. A full list of supported target frameworks can be [found here](https://www.nuget.org/packages/QRCoder/#supportedframeworks-body-tab).
44

55
***
66

@@ -16,33 +16,13 @@ The release notes for the current and all past releases can be read here: [📄
1616

1717
## Usage / Quick start
1818

19-
You only need four lines of code, to generate and view your first QR code.
19+
You only need a couple lines of code, to generate your first QR code.
2020

2121
```csharp
22-
using (QRCodeGenerator qrGenerator = new QRCodeGenerator())
23-
using (QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q))
24-
using (QRCode qrCode = new QRCode(qrCodeData))
25-
{
26-
Bitmap qrCodeImage = qrCode.GetGraphic(20);
27-
}
28-
```
29-
30-
### Optional parameters and overloads
31-
32-
The GetGraphics-method has some more overloads. The first two enable you to set the color of the QR code graphic. One uses Color-class-types, the other HTML hex color notation.
33-
34-
```csharp
35-
//Set color by using Color-class types
36-
Bitmap qrCodeImage = qrCode.GetGraphic(20, Color.DarkRed, Color.PaleGreen, true);
37-
38-
//Set color by using HTML hex color notation
39-
Bitmap qrCodeImage = qrCode.GetGraphic(20, "#000ff0", "#0ff000");
40-
```
41-
42-
The other overload enables you to render a logo/image in the center of the QR code.
43-
44-
```csharp
45-
Bitmap qrCodeImage = qrCode.GetGraphic(20, Color.Black, Color.White, (Bitmap)Bitmap.FromFile("C:\\myimage.png"));
22+
QRCodeGenerator qrGenerator = new QRCodeGenerator();
23+
QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q);
24+
QRCode qrCode = new PngByteQRCode(qrCodeData);
25+
byte[] qrCodeImage = qrCode.GetGraphic(20);
4626
```
4727

4828
There are a plenty of other options. So feel free to read more on that in our wiki: [Wiki: How to use QRCoder](https://github.com/codebude/QRCoder/wiki/How-to-use-QRCoder)
@@ -56,4 +36,7 @@ In case you have a question about using the library (and couldn't find an answer
5636

5737
## Legal information and credits
5838

59-
QRCoder is a project by [Raffael Herrmann](https://raffaelherrmann.de) and was first released in 10/2013. It's licensed under the [MIT license](https://github.com/codebude/QRCoder/blob/master/LICENSE.txt).
39+
QRCoder is a project by [Raffael Herrmann](https://raffaelherrmann.de) and was first released in 10/2013. It's licensed under the [MIT license](https://github.com/codebude/QRCoder/blob/master/LICENSE.txt).
40+
41+
***
42+
<sup>(1)</sup> *Depending on the targeted framework the .NET libraries System.Drawing.Common and System.Text.Encoding.CodePages will used as package dependencies.*

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Info
1010

11-
QRCoder is a simple library, written in C#.NET, which enables you to create QR codes. It hasn't any dependencies to other libraries and is available as .NET Framework and .NET Core PCL version on NuGet.
11+
QRCoder is a simple library, written in C#.NET, which enables you to create QR codes. It hasn't any dependencies to external libraries<sup>1</sup>, is available as package on NuGet and supports .NET Framework, .NET Core, .NET Standard and .NET. A full list of supported target frameworks can be [found here](https://www.nuget.org/packages/QRCoder/#supportedframeworks-body-tab).
1212

1313
Feel free to grab-up/fork the project and make it better!
1414

@@ -135,3 +135,6 @@ The PayloadGenerator supports the following types of payloads:
135135
* [URL](https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators#319-url)
136136
* [WhatsAppMessage](https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators#320-whatsappmessage)
137137
* [WiFi](https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators#321-wifi)
138+
139+
***
140+
<sup>(1)</sup> *Depending on the targeted framework the .NET libraries System.Drawing.Common and System.Text.Encoding.CodePages will used as package dependencies.*

0 commit comments

Comments
 (0)