From 0060e9465831aa97ed71d9a42886a948940e30ce Mon Sep 17 00:00:00 2001
From: Reporting Issue <>
Date: Mon, 18 Sep 2023 15:48:36 -0400
Subject: [PATCH 1/5] Change invertdraw to skia xor blending
- Also added tests
- Refactored viewer tests
---
.../DrawerTest.cs | 108 +++++++++++++++---
src/BinaryKits.Zpl.Viewer/ZplElementDrawer.cs | 35 +-----
2 files changed, 96 insertions(+), 47 deletions(-)
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs b/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs
index 26b52851..c21a637b 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs
@@ -4,8 +4,7 @@
using System;
using System.Collections.Generic;
using System.IO;
-using ZXing;
-using ZXing.Datamatrix;
+
namespace BinaryKits.Zpl.Viewer.UnitTest
{
@@ -40,17 +39,7 @@ public void FontAssignment()
return SKTypeface.Default;
}
};
- IPrinterStorage printerStorage = new PrinterStorage();
- var drawer = new ZplElementDrawer(printerStorage, drawOptions);
-
- var analyzer = new ZplAnalyzer(printerStorage);
- var analyzeInfo = analyzer.Analyze(zplString);
-
- foreach (var labelInfo in analyzeInfo.LabelInfos)
- {
- var imageData = drawer.Draw(labelInfo.ZplElements, 300, 300, 8);
- File.WriteAllBytes("test.png", imageData);
- }
+ DefaultPrint(zplString, "font-assign.png", 300, 300, 8, drawOptions);
}
[TestMethod]
@@ -79,16 +68,101 @@ public void FormatHandling()
^PQ1,0,1,N
^XZ
^FX";
+ DefaultPrint(zplString, "merge-test.png", 100, 100, 8);
+ }
+ [TestMethod]
+ public void InvertColor()
+ {
+ // Example in ZPL manual
+ string test1 = @"
+^XA
+^FO10,100
+^GB70,70,70,,3^FS
+^FO110,100
+^GB70,70,70,,3^FS
+^FO210,100
+^GB70,70,70,,3^FS
+^FO310,100
+^GB70,70,70,,3^FS
+^FO17,110
+^CF0,70,93
+^FR
+^FDREVERSE^FS
+^XZ
+";
+ // from https://github.com/BinaryKits/BinaryKits.Zpl/pull/64
+ string test2 = @"
+^XA
+^FR
+^FO50,50
+^GB100,100,10,W,5^FS
+^FR
+^FO200,50
+^GB100,100,10,W,5^FS
+^FO100,120
+^GB30,25,10,B,2^FS
+^FO250,120
+^GB30,25,10,B,2^FS
+^FO130,180
+^GB90,90,45,B,8^FS
+^FR
+^FO75,300
+^GB30,20,10,W,0^FS
+^FR
+^FO265,300
+^GB30,20,10,W,0^FS
+^FR
+^FO105,320
+^GB160,20,10,W,0^FS
+^FR
+^FO120,310
+^GB10,20,5,B,0^FS
+^FR
+^FO140,310
+^GB10,20,5,B,0^FS
+^FR
+^FO160,310
+^GB10,20,5,B,0^FS
+^FR
+^FO180,310
+^GB10,20,5,B,0^FS
+^FR
+^FO200,310
+^GB10,20,5,B,0^FS
+^FR
+^FO220,310
+^GB10,20,5,B,0^FS
+^FR
+^FO240,310
+^GB10,20,5,B,0^FS
+^FO150,330
+^GB70,90,45,B,0^FS
+^XZ
+";
+ DefaultPrint(test1, "inverted1.png", 100, 100, 8);
+ DefaultPrint(test2, "inverted2.png");
+ }
+
+ ///
+ /// Generic printer to test zpl -> png output
+ ///
+ ///
+ /// PNG filename ex: "file.png"
+ ///
+ ///
+ ///
+ ///
+ private void DefaultPrint(string zpl, string outputFilename, double width=101.6, double height=152.4, int ppmm=8, DrawerOptions options=null) {
IPrinterStorage printerStorage = new PrinterStorage();
- var drawer = new ZplElementDrawer(printerStorage);
+ var drawer = new ZplElementDrawer(printerStorage, options);
var analyzer = new ZplAnalyzer(printerStorage);
- var analyzeInfo = analyzer.Analyze(zplString);
+ var analyzeInfo = analyzer.Analyze(zpl);
foreach (var labelInfo in analyzeInfo.LabelInfos)
{
- var imageData = drawer.Draw(labelInfo.ZplElements, 300, 300, 8);
- File.WriteAllBytes("merge-test.png", imageData);
+ var imageData = drawer.Draw(labelInfo.ZplElements, width, height, ppmm);
+ File.WriteAllBytes(outputFilename, imageData);
}
}
}
diff --git a/src/BinaryKits.Zpl.Viewer/ZplElementDrawer.cs b/src/BinaryKits.Zpl.Viewer/ZplElementDrawer.cs
index 72bf4c23..35bd13de 100644
--- a/src/BinaryKits.Zpl.Viewer/ZplElementDrawer.cs
+++ b/src/BinaryKits.Zpl.Viewer/ZplElementDrawer.cs
@@ -79,7 +79,7 @@ public byte[] Draw(
drawer.Draw(element, _drawerOptions);
- this.InvertDraw(skBitmap, skBitmapInvert);
+ this.InvertDraw(skCanvas, skBitmapInvert);
continue;
}
@@ -124,37 +124,12 @@ public byte[] Draw(
return data.ToArray();
}
- private void InvertDraw(SKBitmap skBitmap, SKBitmap skBitmapInvert)
+ private void InvertDraw(SKCanvas baseCanvas, SKBitmap bmToInvert)
{
- // Fast local copy
- var originalBytes = skBitmap.GetPixelSpan();
- var invertBytes = skBitmapInvert.GetPixelSpan();
-
- int total = originalBytes.Length / 4;
- for (int i = 0; i < total; i++)
+ using (SKPaint paint = new SKPaint())
{
- // RGBA8888
- int rLoc = (i << 2);
- int gLoc = (i << 2) + 1;
- int bLoc = (i << 2) + 2;
- int aLoc = (i << 2) + 3;
- if (invertBytes[aLoc] == 0)
- {
- continue;
- }
-
- // Set color
- byte rByte = (byte)(originalBytes[rLoc] ^ invertBytes[rLoc]);
- byte gByte = (byte)(originalBytes[gLoc] ^ invertBytes[gLoc]);
- byte bByte = (byte)(originalBytes[bLoc] ^ invertBytes[bLoc]);
- byte aByte = (byte)(originalBytes[aLoc] ^ invertBytes[aLoc]);
-
- var targetColor = new SKColor(rByte, gByte, bByte, aByte);
-
- int x, y;
- y = Math.DivRem(i, skBitmapInvert.Width, out x);
-
- skBitmap.SetPixel(x, y, targetColor);
+ paint.BlendMode = SKBlendMode.Xor;
+ baseCanvas.DrawBitmap(bmToInvert, 0, 0, paint);
}
}
}
From d920f1b280d432a59cbde5d3e566648c881879de Mon Sep 17 00:00:00 2001
From: Reporting Issue <>
Date: Thu, 21 Sep 2023 00:29:55 -0400
Subject: [PATCH 2/5] Begin structuring viewer testing project
- readme for goals
- custom test for feature development
- zpl/png data folder copied to output
- factor out more to common
---
.../BinaryKits.Zpl.Viewer.UnitTest.csproj | 10 +-
src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs | 53 +++++++
.../CustomTest.cs | 15 ++
.../Data/Png/Ref/.gitkeep | 0
.../Data/Png/Test/.gitkeep | 0
.../Data/Zpl/custom.zpl2 | 0
.../Data/Zpl/font-assign.zpl2 | 6 +
.../Data/Zpl/invert1.zpl2 | 14 ++
.../Data/Zpl/invert2.zpl2 | 46 ++++++
.../Data/Zpl/merge.zpl2 | 21 +++
.../DrawerTest.cs | 132 ++----------------
src/BinaryKits.Zpl.Viewer.UnitTest/README.md | 23 +++
12 files changed, 196 insertions(+), 124 deletions(-)
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/CustomTest.cs
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Png/Ref/.gitkeep
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Png/Test/.gitkeep
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/custom.zpl2
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/font-assign.zpl2
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert1.zpl2
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert2.zpl2
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/merge.zpl2
create mode 100644 src/BinaryKits.Zpl.Viewer.UnitTest/README.md
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
index bd475c60..924b7378 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
@@ -19,5 +19,13 @@
-
+
+
+ PreserveNewest
+
+
+
+
+
+
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs b/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs
new file mode 100644
index 00000000..eabe0c2e
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs
@@ -0,0 +1,53 @@
+using System.IO;
+using BinaryKits.Zpl.Viewer.ElementDrawers;
+
+namespace BinaryKits.Zpl.Viewer.UnitTest
+{
+ internal class Common
+ {
+ ///
+ /// Load zpl strings from files in the Data/Zpl directory
+ ///
+ /// name of of the file, .zpl2 extension optional
+ ///
+ public static string LoadZPL(string name) {
+ if (!name.Contains(".zpl2"))
+ {
+ name += ".zpl2"; ;
+ }
+ var path = Path.Combine("Data", "ZPl", name);
+ return System.IO.File.ReadAllText(path);
+ }
+
+ ///
+ /// Generic printer to test zpl -> png output
+ ///
+ ///
+ /// PNG filename ex: "file.png"
+ ///
+ ///
+ ///
+ ///
+ public static void DefaultPrint(
+ string zpl,
+ string outputFilename,
+ double width = 101.6,
+ double height = 152.4,
+ int ppmm = 8,
+ DrawerOptions options = null
+ )
+ {
+ IPrinterStorage printerStorage = new PrinterStorage();
+ var drawer = new ZplElementDrawer(printerStorage, options);
+
+ var analyzer = new ZplAnalyzer(printerStorage);
+ var analyzeInfo = analyzer.Analyze(zpl);
+
+ foreach (var labelInfo in analyzeInfo.LabelInfos)
+ {
+ var imageData = drawer.Draw(labelInfo.ZplElements, width, height, ppmm);
+ File.WriteAllBytes(outputFilename, imageData);
+ }
+ }
+ }
+}
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/CustomTest.cs b/src/BinaryKits.Zpl.Viewer.UnitTest/CustomTest.cs
new file mode 100644
index 00000000..158d4166
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/CustomTest.cs
@@ -0,0 +1,15 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace BinaryKits.Zpl.Viewer.UnitTest
+{
+ [TestClass]
+ public class CustomTest
+ {
+ [TestMethod]
+ public void Custom()
+ {
+ string zplString = Common.LoadZPL("custom");
+ Common.DefaultPrint(zplString, "custom.png");
+ }
+ }
+}
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Png/Ref/.gitkeep b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Png/Ref/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Png/Test/.gitkeep b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Png/Test/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/custom.zpl2 b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/custom.zpl2
new file mode 100644
index 00000000..e69de29b
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/font-assign.zpl2 b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/font-assign.zpl2
new file mode 100644
index 00000000..b36f491c
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/font-assign.zpl2
@@ -0,0 +1,6 @@
+^XA
+^FO20, 20
+^A1N,40, 30 ^FD西瓜^FS
+^FO20, 50
+^A0N,40, 30 ^FDABCDEFG^FS
+^XZ
\ No newline at end of file
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert1.zpl2 b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert1.zpl2
new file mode 100644
index 00000000..56b90ce5
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert1.zpl2
@@ -0,0 +1,14 @@
+^XA
+^FO10,100
+^GB70,70,70,,3^FS
+^FO110,100
+^GB70,70,70,,3^FS
+^FO210,100
+^GB70,70,70,,3^FS
+^FO310,100
+^GB70,70,70,,3^FS
+^FO17,110
+^CF0,70,93
+^FR
+^FDREVERSE^FS
+^XZ
\ No newline at end of file
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert2.zpl2 b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert2.zpl2
new file mode 100644
index 00000000..61236a71
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/invert2.zpl2
@@ -0,0 +1,46 @@
+^XA
+^FR
+^FO50,50
+^GB100,100,10,W,5^FS
+^FR
+^FO200,50
+^GB100,100,10,W,5^FS
+^FO100,120
+^GB30,25,10,B,2^FS
+^FO250,120
+^GB30,25,10,B,2^FS
+^FO130,180
+^GB90,90,45,B,8^FS
+^FR
+^FO75,300
+^GB30,20,10,W,0^FS
+^FR
+^FO265,300
+^GB30,20,10,W,0^FS
+^FR
+^FO105,320
+^GB160,20,10,W,0^FS
+^FR
+^FO120,310
+^GB10,20,5,B,0^FS
+^FR
+^FO140,310
+^GB10,20,5,B,0^FS
+^FR
+^FO160,310
+^GB10,20,5,B,0^FS
+^FR
+^FO180,310
+^GB10,20,5,B,0^FS
+^FR
+^FO200,310
+^GB10,20,5,B,0^FS
+^FR
+^FO220,310
+^GB10,20,5,B,0^FS
+^FR
+^FO240,310
+^GB10,20,5,B,0^FS
+^FO150,330
+^GB70,90,45,B,0^FS
+^XZ
\ No newline at end of file
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/merge.zpl2 b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/merge.zpl2
new file mode 100644
index 00000000..615476e4
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/Data/Zpl/merge.zpl2
@@ -0,0 +1,21 @@
+^XA
+^DFETIQUE-1^FS
+^PRC
+^LH0,0^FS
+^LL408
+^MD0
+^MNY
+^LH0,0^FS
+^FO120,141^A0N,27,23^CI13^FR^FN999^FS
+^BY2,3.0^FO213,7^BCN,80,N,Y,N^FR^FN997^FS
+^FO313,95^A0N,35,23^CI13^FR^FB105,2,0,L^FN997^FS
+^FO40,141^A0N,27,33^CI13^FR^FDP/N :^FS
+^XZ
+
+^XA
+^XFETIQUE-1.ZPL
+^FN999^FDC19755BA01:F9111^FS
+^FN997^FD3758292^FS
+^PQ1,0,1,N
+^XZ
+^FX
\ No newline at end of file
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs b/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs
index c21a637b..fbda5442 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/DrawerTest.cs
@@ -1,9 +1,6 @@
using BinaryKits.Zpl.Viewer.ElementDrawers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SkiaSharp;
-using System;
-using System.Collections.Generic;
-using System.IO;
namespace BinaryKits.Zpl.Viewer.UnitTest
@@ -14,13 +11,7 @@ public class DrawerTest
[TestMethod]
public void FontAssignment()
{
- string zplString = @"
-^XA
-^FO20, 20
-^A1N,40, 30 ^FD西瓜^FS
-^FO20, 50
-^A0N,40, 30 ^FDABCDEFG^FS
-^XZ";
+ string zplString = Common.LoadZPL("font-assign");
var drawOptions = new DrawerOptions()
{
@@ -39,131 +30,26 @@ public void FontAssignment()
return SKTypeface.Default;
}
};
- DefaultPrint(zplString, "font-assign.png", 300, 300, 8, drawOptions);
+ Common.DefaultPrint(zplString, "font-assign.png", 300, 300, 8, drawOptions);
}
[TestMethod]
public void FormatHandling()
{
- string zplString = @"
-^XA
-^DFETIQUE-1^FS
-^PRC
-^LH0,0^FS
-^LL408
-^MD0
-^MNY
-^LH0,0^FS
-^FO120,141^A0N,27,23^CI13^FR^FN999^FS
-^BY2,3.0^FO213,7^BCN,80,N,Y,N^FR^FN997^FS
-^FO313,95^A0N,35,23^CI13^FR^FB105,2,0,L^FN997^FS
-^FO40,141^A0N,27,33^CI13^FR^FDP/N :^FS
-^XZ
-
-
-^XA
-^XFETIQUE-1.ZPL
-^FN999^FDC19755BA01:F9111^FS
-^FN997^FD3758292^FS
-^PQ1,0,1,N
-^XZ
-^FX";
- DefaultPrint(zplString, "merge-test.png", 100, 100, 8);
+ string zplString = Common.LoadZPL("merge");
+ Common.DefaultPrint(zplString, "merge.png", 100, 100, 8);
}
+
[TestMethod]
public void InvertColor()
{
// Example in ZPL manual
- string test1 = @"
-^XA
-^FO10,100
-^GB70,70,70,,3^FS
-^FO110,100
-^GB70,70,70,,3^FS
-^FO210,100
-^GB70,70,70,,3^FS
-^FO310,100
-^GB70,70,70,,3^FS
-^FO17,110
-^CF0,70,93
-^FR
-^FDREVERSE^FS
-^XZ
-";
+ string test1 = Common.LoadZPL("invert1");
// from https://github.com/BinaryKits/BinaryKits.Zpl/pull/64
- string test2 = @"
-^XA
-^FR
-^FO50,50
-^GB100,100,10,W,5^FS
-^FR
-^FO200,50
-^GB100,100,10,W,5^FS
-^FO100,120
-^GB30,25,10,B,2^FS
-^FO250,120
-^GB30,25,10,B,2^FS
-^FO130,180
-^GB90,90,45,B,8^FS
-^FR
-^FO75,300
-^GB30,20,10,W,0^FS
-^FR
-^FO265,300
-^GB30,20,10,W,0^FS
-^FR
-^FO105,320
-^GB160,20,10,W,0^FS
-^FR
-^FO120,310
-^GB10,20,5,B,0^FS
-^FR
-^FO140,310
-^GB10,20,5,B,0^FS
-^FR
-^FO160,310
-^GB10,20,5,B,0^FS
-^FR
-^FO180,310
-^GB10,20,5,B,0^FS
-^FR
-^FO200,310
-^GB10,20,5,B,0^FS
-^FR
-^FO220,310
-^GB10,20,5,B,0^FS
-^FR
-^FO240,310
-^GB10,20,5,B,0^FS
-^FO150,330
-^GB70,90,45,B,0^FS
-^XZ
-";
- DefaultPrint(test1, "inverted1.png", 100, 100, 8);
- DefaultPrint(test2, "inverted2.png");
- }
+ string test2 = Common.LoadZPL("invert2");
- ///
- /// Generic printer to test zpl -> png output
- ///
- ///
- /// PNG filename ex: "file.png"
- ///
- ///
- ///
- ///
- private void DefaultPrint(string zpl, string outputFilename, double width=101.6, double height=152.4, int ppmm=8, DrawerOptions options=null) {
- IPrinterStorage printerStorage = new PrinterStorage();
- var drawer = new ZplElementDrawer(printerStorage, options);
-
- var analyzer = new ZplAnalyzer(printerStorage);
- var analyzeInfo = analyzer.Analyze(zpl);
-
- foreach (var labelInfo in analyzeInfo.LabelInfos)
- {
- var imageData = drawer.Draw(labelInfo.ZplElements, width, height, ppmm);
- File.WriteAllBytes(outputFilename, imageData);
- }
+ Common.DefaultPrint(test1, "inverted1.png", 100, 100, 8);
+ Common.DefaultPrint(test2, "inverted2.png");
}
}
}
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/README.md b/src/BinaryKits.Zpl.Viewer.UnitTest/README.md
new file mode 100644
index 00000000..bcd70be4
--- /dev/null
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/README.md
@@ -0,0 +1,23 @@
+# Viewer Unit Test
+
+This project (should) supports the Viewer project in multiple ways.
+
+## Standard unit testing
+Mostly testing the features of the virtual printer(s) and analyzers.
+
+## Detect changes and regressions in png outputs
+Given a set of known good png output files, we should be able to detect when new output changes.
+This would be done by loading 2 pngs into skia bitmaps and xor-ing them. We can then count the amount of black pixels and output a new png showing the difference.
+
+## Feature development
+The `CustomTest.cs` exists for quick development. Load your zpl data in `Data/Zpl/custom.zpl2` and test. Changes to these files are not tracked under source control. Use `git update-index --no-skip-worktree custom.zpl2` and `git update-index --skip-worktree custom.zpl2` (see https://stackoverflow.com/a/39776107) to enable tracking changes to the files.
+
+## Benchmarks
+Performance isn't stellar yet. We can use features in Visual Studio, but other tools might be more suitable like [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet).
+
+Note that a lot of time is spent inside 3rd party libraries like Skia, BarcodeLib and Zxing.net and Drawing.
+
+## Todo
+- [ ] Linux compatibility
+- [ ] Benchmarking
+- [ ] Xor diffing pngs
\ No newline at end of file
From 50a8e1a054a8093a2990af71d6ce24429bda3399 Mon Sep 17 00:00:00 2001
From: Reporting Issue <>
Date: Thu, 21 Sep 2023 00:58:32 -0400
Subject: [PATCH 3/5] Try to fix cannot copy data to output for linux build
---
.../BinaryKits.Zpl.Viewer.UnitTest.csproj | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
index 924b7378..45b103c7 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
@@ -20,12 +20,13 @@
-
+
PreserveNewest
-
-
+
+
+
From ca0392c5059fa73cbc3d7d660e7c2917ef638c2c Mon Sep 17 00:00:00 2001
From: Reporting Issue <>
Date: Thu, 21 Sep 2023 01:09:30 -0400
Subject: [PATCH 4/5] Copy data again
---
.../BinaryKits.Zpl.Viewer.UnitTest.csproj | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
index 45b103c7..decebe90 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
@@ -20,13 +20,13 @@
-
- PreserveNewest
+
+ Always
-
-
-
+
+
+
From 68c4fd5a7ddcbf991b04d7a08b7b15ff76053cb6 Mon Sep 17 00:00:00 2001
From: Reporting Issue <>
Date: Thu, 21 Sep 2023 01:38:03 -0400
Subject: [PATCH 5/5] Capitalization mistake
---
.../BinaryKits.Zpl.Viewer.UnitTest.csproj | 5 -----
src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
index decebe90..4e30eba7 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/BinaryKits.Zpl.Viewer.UnitTest.csproj
@@ -24,9 +24,4 @@
Always
-
-
-
-
-
diff --git a/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs b/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs
index eabe0c2e..2819a926 100644
--- a/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs
+++ b/src/BinaryKits.Zpl.Viewer.UnitTest/Common.cs
@@ -15,7 +15,7 @@ public static string LoadZPL(string name) {
{
name += ".zpl2"; ;
}
- var path = Path.Combine("Data", "ZPl", name);
+ var path = Path.Combine("Data", "Zpl", name);
return System.IO.File.ReadAllText(path);
}