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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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