Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressASCII ¶ added in v1.0.3
CompressASCII compresses the ASCII data of a ZPL Graphic Field using RLE
Example ¶
package main import ( "fmt" "simonwaldherr.de/go/zplgfa" ) func main() { str := zplgfa.CompressASCII("FFFFFFFF000000") fmt.Print(str) }
Output: NFL0
func ConvertToGraphicField ¶
func ConvertToGraphicField(source image.Image, graphicType GraphicType) string
ConvertToGraphicField converts an image.Image picture to a ZPL compatible Graphic Field. The ZPL ^GF (Graphic Field) supports various data formats, this package supports the normal ASCII encoded, as well as a RLE compressed ASCII format. It also supports the Binary Graphic Field format. The encoding can be chosen by the second argument.
func ConvertToZPL ¶
func ConvertToZPL(img image.Image, graphicType GraphicType) string
ConvertToZPL is just a wrapper for ConvertToGraphicField which also includes the ZPL starting code ^XA and ending code ^XZ, as well as a Field Separator and Field Origin.
Types ¶
type GraphicType ¶
type GraphicType int
GraphicType is a type to select the graphic format
const ( // ASCII graphic type using only hex characters (0-9A-F) ASCII GraphicType = iota // Binary saving the same data as binary Binary // CompressedASCII compresses the hex data via RLE CompressedASCII )
Click to show internal directories.
Click to hide internal directories.