Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
battlezone opened this issue Jan 4, 2025 · 1 comment

Comments

@battlezone
Copy link

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
@Cyrilanthony777
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants