ZPL commands
^GF with :Z64 · Compressed Graphic Data
^GF with Z64 encoding: the bitmap is compressed with zlib deflate , Base64-encoded and sent with a checksum. There is no ^GZ command in ZPL.
^GF with Z64 encoding: the bitmap is compressed with zlib (deflate), Base64-encoded and sent with a checksum. There is no ^GZ command in ZPL.
Parameters
^GFA,b,c,d,:Z64:data:crc- b, c: Byte count of the uncompressed graphic (bytes per row × rows)^GFA,b,c,d,:Z64:data:crc- d: Bytes per row (width in dots ÷ 8, rounded up)^GFA,b,c,d,:Z64:data:crc- :Z64: - Marker for zlib-compressed, Base64-encoded data (:B64:= Base64 without compression)^GFA,b,c,d,:Z64:data:crc- data: Base64 text of the compressed bitmap^GFA,b,c,d,:Z64:data:crc- crc: CRC-16 of the Base64 data as 4 hex digits
Example
^XA
^FO50,50^GFA,1280,1280,40,:Z64:<base64>:<crc>^FS
^XZ
Tip
Z64 pays off especially for large logos. Graphics from the zplCloud image import already contain fully encoded ^GFA data - for formats A, B and C see ^GF.