Repository navigation
Conversation
Fragmentation is already built into the ESC * command, so there's no need to fragment images.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #810 +/- ##
==========================================
- Coverage 79.33% 79.28% -0.05%
==========================================
Files 21 21
Lines 1742 1738 -4
Branches 241 241
==========================================
- Hits 1382 1378 -4
Misses 282 282
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Hi @dalpil and thank you for opening this request! My TM-H6000 is not affected by the gaps issue but I can confirm no regressions in
Note that the little white bands are not gaps. In relation with the line-width size I can confirm the same behavior as your printer, no difference between 0 and 49, starting to see the gap at 50 units:
Note the thin gap in the third print-out. I also don't know why this value was set to |
belono
left a comment
There was a problem hiding this comment.
I made a couple of debatable suggestions so that we can discuss them with the rest of the contributors.
There was a problem hiding this comment.
| outp = [LINESPACING_FUNCS[180] + int.to_bytes(0)] # Disable linespacing |
Additionally int.to_bytes(0) can be wrapped into a constant named like LINESPACING_DISABLE or similar
There was a problem hiding this comment.
| outp.append(LINESPACING_RESET) # Reset line-feed size |
We take profit of the existing constant LINESPACING_RESET
|
It's interesting that you're not getting any gaps in your prints. I had a look in the TM-H6000 Developer Guide and it seems like the "ESC *" command (section 4-8 in the guide) should behave like it does on my printer, so I'd expect gaps to appear in your prints (from the master branch) as well. Did you specify a fragment_height of 100 when printing the images, or something else that isn't divisible by 24? I.e. p.image('david.png', fragment_height=100, impl='bitImageColumn')The use of existing constants seems like a good idea, I'll make sure to apply the suggested changes. 👍 |
|
Perfect, that's the kind of gaps that I'm trying to get rid of. Thank you for reproducing the issue. I'll update the PR with the suggested changes later this evening. |
f4eaa88 to
5c12f8d
Compare



Description
The bitImageColumn (ESC *) method for printing images does not need image fragmentation, as it's already built into the command itself. Image data is always sent in chunks with a height of 8 or 24.
I also simplified the to_column_format-method a bit.
I'm not entirely sure why the line feed is being set to 16. I feel like it should be set to 24 for double-density images. This does not seem to matter though, as I can push the line feed up to 50 until i start getting white horizontal lines in my prints.
I looked into some other implementations, and most of them seem to set the line-feed to 24, but it could just as well be set to 0 it seems, at least on my printer.
Since I don't know why it's being set to 16 I'll refrain from changing it, as it doesn't seem to matter on my printer.
Anyhow, here's a comparison of two bitImageColumn-prints before and after my changes (i set fragment_height to 100 for the print on the left):
Please let me know if the PR can be improved in any way, I'm open for discussion.
Closes #802.
Tested with
Epson TM-m30