niimprint icon indicating copy to clipboard operation
niimprint copied to clipboard

Printing example 80x50 image gives error: "Image width too big for B21"

Open battlezone opened this issue 1 year ago • 1 comments

I am trying to print the example 80x50mm image on my B1 with 80x50mm labels added, but it gives me an error that the image width is too big. I tried rescaling a few times but it doesn't change. It does get printed if I add -r 90 but then it obviosly doesn't fit. The 30x15mm label does get printed. Here's the error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/battlezone/git/niimprint/niimprint/__main__.py", line 96, in <module>
    print_cmd()
    ~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/battlezone/git/niimprint/niimprint/__main__.py", line 89, in print_cmd
    assert image.width <= max_width_px, f"Image width too big for {model.upper()}"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Image width too big for B21

battlezone avatar Jan 04 '25 15:01 battlezone

https://github.com/AndBondStyle/niimprint/blob/be39f68c16a5a7dc1b09bb173700d0ee1ec9cb66/niimprint/main.py#L77C9-L77C27 I had the same issue and i changed the above value to 500 now it works but height is cutoff.

Cyrilanthony777 avatar Jan 09 '25 11:01 Cyrilanthony777