Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Current repo prints images with inverted colors

Open
#408 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
nodejs, typescript
Domain
embedded-iot

Research direction

Start with packages/printer/src/image.ts at line 26 and compare its pixel conversion with the old packages/printer/image.js at line 30. Reproduce image printing with a QR image or another black-and-white image, then verify that white and black pixels produce the expected output on a printer.

Written by the indexing model from the issue text.

Description

I managed to get the current repo running, everything works well except that images (including qrimage) white pixels are printed as black and black ones as white, I guess there's a issue with the function that converts pixels to black or white?
https://github.com/song940/node-escpos/blob/v3/packages/printer/src/image.ts#L26

this is the old code: https://github.com/song940/node-escpos/blob/ad1cade11f616f20bb112b3d5ecdfee85e77aff4/packages/printer/image.js#L30

I don't think there's an issue with my printer because the old version on npm prints images well

Dominant language
TypeScript
Stars
1.6k
Forks
443
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lsongdev/node-escpos

All issues in lsongdev/node-escpos

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.