Skip to content

ESC/Label: Shrink payload size #67

@pc-coholic

Description

@pc-coholic

Right now, we are using the P,P-command to encode and transmit the picture-payload to the printer.

We might (!) be able to speed up the printing process by using the B,P-notation instead.

Implementation Details from Epson Lets first understand the parameters "P,P" vs "B,P"

"P,P", this means the following data is in ZB64 encoding.

Base64 encoding means 6 bits per character for increased compactness/ efficiency.

Their command to upload the image to E: is:

~DYE:1_01.PNG,P,P,177595,0, ....

But the data "..." has 236806 bytes, not 177595. Why?:

There are 12 control character bytes:

5 prefix: ":B64:" - to show the data is ZB64
7 suffix: "==:76EF" - to show the CRC

236806 - 12 = 236794

236794 * 0.75 = 177595 (where 0.75 is the conversion rate from 8 bit to 6 bit)
This is where 177595 comes from.
To change the parameters from "P,P" to "B,P", the data will also need to be transformed.
So you cannot simply change from "P,P" to "B,P"
But I would need to investigate what is required for a conversion of the data. further.

Note there is a key printer limitation of uploading ZB64 data to E: (permanent) memory .

It is extremely slow is due to significant translational complexity -- where it does the 8 to 6 bit conversions.
So avoid "P,P" when uploading to "E:"

Countermeasure:
Instead this can be mitigated if you send the data to R: instead =>
~DYR:TEST.PNG,P,P,177595,40, ....

The upload time is instant.
Then apply the ^TO command, to move the data to E:, which is instant.
XA^TOR:TEST.PNG,E:TEST.PNG^XZ

Please make this suggestion.
But ensure the FW is latest, if it is older than 06.32.TG19N5 then a "Memory Full Error" will occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions