more tests

This commit is contained in:
Simon Waldherr
2018-10-20 18:53:25 +02:00
parent 2eb19cc251
commit 713b56ef81
4 changed files with 14 additions and 3 deletions

BIN
tests/test6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
tests/test7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

View File

@@ -89,7 +89,6 @@ func getRepeatCode(repeatCount int, char string) string {
// CompressASCII compresses the ASCII data of a ZPL Graphic Field using RLE
func CompressASCII(in string) string {
in = strings.ToUpper(in)
var curChar string
var lastChar string
var lastCharSince int
@@ -171,7 +170,9 @@ func ConvertToGraphicField(source image.Image, graphicType GraphicType) string {
index = 0
}
}
hexstr := hex.EncodeToString(line)
hexstr := strings.ToUpper(hex.EncodeToString(line))
switch graphicType {
case ASCII:
GraphicFieldData += fmt.Sprintln(hexstr)