Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3219924
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:42:09+00:00 2026-05-17T15:42:09+00:00

Is anyone aware of a library suitable for writing an image in .TMB format?

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:42:09+00:00Added an answer on May 17, 2026 at 3:42 pm

    After about an hour or so of looking at binary data, I came to the following conclusion:

    A *.TMB image is really just a serialized ESC/POS command to print a raster image.

    Using the following command:

    od -t a -v [YOUR_TMB_FILE] | head

    we 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:

    0000000  gs   v   0 nul   5 nul   P nul del del del del del del del del
    0000020 del del del del del del del del del del del del del del del del
    ... snipped for brevity ...
    

    According to the ESC/POS Programming Guide, the ASCII command to print a raster image is:

    GS V 0

    Hmm.. Interesting!

    On a whim, I decided to convert 5 and P to their decimal equivalents, which are 53 and 80 respectively, 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:

      1 out = open('test.TMB', 'wb')
      2 
      3 width = 80
      4 height = 53
      5 
      6 NUL = chr(0)
      7 GS = chr(29)
      8 V = chr(118)
      9 ZERO = chr(48)
     10 
     11 W = chr(width)
     12 H = chr(height)
     13 
     14 out.write(GS)
     15 out.write(V)
     16 out.write(ZERO)
     17 out.write(NUL)
     18 
     19 out.write(H)
     20 out.write(NUL)
     21 out.write(W)
     22 out.write(NUL)
     23 
     24 for y in range(0, height):
     25     for x in range(0, width):
     26         out.write(chr(127))    # looks like `del` in ASCII mode
     27 
     28 out.close()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is anyone aware of a such a thing as a SQL writing library for
Before I go ahead and write something myself is anyone aware of a library
Apart from lxml , is anyone aware of Python packages that depend on libxml2
Anyone aware of F/OSS library for clustering algorithms? Specifically interested in Hierarchical Clustering. Surely
Is anyone aware of a Venn diagram library for Flash? XML driven would be
Is anyone aware of a decent CSV export tool for exporting from a ListView?
Is anyone aware of a library that uses the the techniques (annotations and classworking)
Anyone aware of a method/class/library that will allow me to easily reproduce the results
Is anyone aware of a C# zip library which is legacy (ZIP 2.0) compression
Is anyone aware of a library that can load a standard MIDI File and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.