Skip to content

Commit 8d7dde8

Browse files
committed
Set default to 1.0 in helper function
1 parent a53745c commit 8d7dde8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

QRCoder/ArtQRCode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Bitmap GetGraphic(Bitmap backgroundImage = null)
5959
/// <param name="backgroundImageStyle">Style of the background image (if set). Fill=spanning complete graphic; DataAreaOnly=Don't paint background into quietzone</param>
6060
/// <param name="finderPatternImage">Optional image that should be used instead of the default finder patterns</param>
6161
/// <returns>QRCode graphic as bitmap</returns>
62-
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, Color backgroundColor, Bitmap backgroundImage = null, double pixelSizeFactor = 1.0,
62+
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, Color backgroundColor, Bitmap backgroundImage = null, double pixelSizeFactor = 1,
6363
bool drawQuietZones = true, QuietZoneStyle quietZoneRenderingStyle = QuietZoneStyle.Dotted,
6464
BackgroundImageStyle backgroundImageStyle = BackgroundImageStyle.DataAreaOnly, Bitmap finderPatternImage = null)
6565
{
@@ -283,7 +283,7 @@ public static class ArtQRCodeHelper
283283
/// <param name="finderPatternImage">Optional image that should be used instead of the default finder patterns</param>
284284
/// <returns>QRCode graphic as bitmap</returns>
285285
public static Bitmap GetQRCode(string plainText, int pixelsPerModule, Color darkColor, Color lightColor, Color backgroundColor, ECCLevel eccLevel, bool forceUtf8 = false,
286-
bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, Bitmap backgroundImage = null, double pixelSizeFactor = 0.8,
286+
bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, Bitmap backgroundImage = null, double pixelSizeFactor = 1.0,
287287
bool drawQuietZones = true, QuietZoneStyle quietZoneRenderingStyle = QuietZoneStyle.Flat,
288288
BackgroundImageStyle backgroundImageStyle = BackgroundImageStyle.DataAreaOnly, Bitmap finderPatternImage = null)
289289
{

QRCoderTests/ArtQRCodeRendererTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Drawing;
77
using QRCoderTests.Helpers.XUnitExtenstions;
88
using QRCoderTests.Helpers;
9+
using System.Drawing.Imaging;
910

1011
namespace QRCoderTests
1112
{
@@ -110,9 +111,9 @@ public void can_render_artqrcode_from_helper()
110111
{
111112
//Create QR code
112113
var bmp = ArtQRCodeHelper.GetQRCode("A", 10, Color.Black, Color.White, Color.Transparent, QRCodeGenerator.ECCLevel.L);
113-
114+
((Bitmap)bmp.Clone()).Save("C:\\Users\\netbl\\Downloads\\art_new.png", ImageFormat.Png);
114115
var result = HelperFunctions.BitmapToHash(bmp);
115-
result.ShouldBe("6c1bb8257349b29f76e50c3fa8abd9c9");
116+
result.ShouldBe("57ecaa9bdeadcdcbeac8a19d734907ff");
116117
}
117118
}
118119
}

0 commit comments

Comments
 (0)