Is anyone aware of a library suitable for writing an image in .TMB format?
The .TMB format is suitable for printing logos from a Epson thermal receipt printer.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After about an hour or so of looking at binary data, I came to the following conclusion:
Using the following command:
od -t a -v [YOUR_TMB_FILE] | headwe can view the binary data, as ASCII character data, in the beginning of the TMB file.
I had a file that looked something like this:
According to the ESC/POS Programming Guide, the ASCII command to print a raster image is:
GS V 0Hmm.. Interesting!
On a whim, I decided to convert
5andPto their decimal equivalents, which are53and80respectively, the exact dimensions of my .TMB image (actually, its 80×53)!Everything fell into place after this. The remainder of a .TMB file is just the binary image data.
Here is a one-off Python script I wrote to test my theory: