AndBondStyle / niimprint

Python library for Niimbot label printers. Supports D11/B21/B1 via bluetooth or USB.
MIT License
224 stars 32 forks source link

Limited `height` on B21S printer #14

Closed Sebekerga closed 8 months ago

Sebekerga commented 8 months ago

On B21S the following command:

[niimbot] ~\Documents\niimprint> python -m niimprint -a COM7 -r 90 -i .\examples\B21_80x50mm_640x384px.png -v                                                                                03/08/24 21:40:17 PM
DEBUG | PngImagePlugin:call:190 - STREAM b'IHDR' 16 13
DEBUG | PngImagePlugin:call:190 - STREAM b'pHYs' 41 9
DEBUG | PngImagePlugin:call:190 - STREAM b'IDAT' 62 8192
DEBUG | printer:_log_buffer:146 - send: 55:55:21:01:05:25:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:31:01:01:31:aa:aa
DEBUG | printer:_log_buffer:146 - send: 55:55:23:01:01:23:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:33:01:01:33:aa:aa
DEBUG | printer:_log_buffer:146 - send: 55:55:01:01:01:01:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:02:01:01:02:aa:aa
DEBUG | printer:_log_buffer:146 - send: 55:55:03:01:01:03:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:04:01:01:04:aa:aa
DEBUG | printer:_log_buffer:146 - send: 55:55:13:04:02:80:01:80:14:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:14:02:01:00:17:aa:aa
DEBUG | printer:_log_buffer:146 - send: 55:55:e3:01:01:e3:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:d3:03:00:c7:01:16:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:d3:03:01:8f:01:5f:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:d3:03:02:57:01:84:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:d3:03:02:7f:01:ac:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:e4:01:01:e4:aa:aa
DEBUG | printer:_log_buffer:146 - send: 55:55:f3:01:01:f3:aa:aa
DEBUG | printer:_log_buffer:146 - recv: 55:55:f4:01:01:f4:aa:aa

Produces the following result on 50mm wide, 30mm tall labels, cutting image at around 22mm (~176px): image

If there is any other info i can provide, lmk :)

P.S. This might be usefull: image

AndBondStyle commented 8 months ago

I think this is related to #3, which I'm endlessly procrastinating to fix... I'll ping you when a fix would be available
P.S. Right now you can test the code from PR #12, see if it works

Sebekerga commented 8 months ago

@AndBondStyle can confirm, #12 works as expected <3

Given, it's a duplicate of #3, this can be closed, I think.