Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Support image justification #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cfreshman
Copy link

@cfreshman cfreshman commented Feb 20, 2023

Allow for printing images (and bitmaps) with the current text justification setting

Usage:

printer.justify('C')
printer.printImage(img, justify=True)

It is especially useful for small images:
centered QR code

Notes:

  • this follows the same pattern as the LaaT configuration, but could be implemented as a separate setting method as well
  • printertest.py could showcase this option by centering the bottom QR code & Adafruit!, I can update this CR to include that if desired

@cfreshman
Copy link
Author

cfreshman commented Feb 20, 2023

Here's the potential update to printertest.py (not included in this CR yet): cfreshman@39713f7

@cfreshman
Copy link
Author

cfreshman commented Feb 20, 2023

There's a somewhat related issue for another image option, resizing: #6

That could be added as a keyword argument as well: cfreshman@7bf8b15

printer.printImage(img, resize=True)

I can create a pull request for that after this

@cfreshman cfreshman force-pushed the patch-1 branch 2 times, most recently from 7bf8b15 to 4046457 Compare February 21, 2023 16:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant