Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESC/Label: Shrink payload size #67

Open
pc-coholic opened this issue Sep 1, 2023 · 0 comments
Open

ESC/Label: Shrink payload size #67

pc-coholic opened this issue Sep 1, 2023 · 0 comments

Comments

@pc-coholic
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant