Commit Graph

130 Commits

Author SHA1 Message Date
Philipp Klaus 99ee28fdaa require pillow>=3.3.0
with pillow < 3.3.0, the call of Image.new()
in brother_ql/brother_ql_create.py line 113
would fail with the following error:

[...]
  File "/usr/lib/python3.4/site-packages/brother_ql/brother_ql_create.py", line 113, in create_label
    new_im = Image.new(im.mode, (device_pixel_width, im.size[1]), (255,)*len(im.mode))
  File "/usr/lib64/python3.4/site-packages/PIL/Image.py", line 2050, in new
    return Image()._new(core.fill(mode, size, color))
TypeError: an integer is required (got type tuple)
2018-01-15 15:26:20 +01:00
Philipp Klaus 32ba70b7dc removed import numpy overlooked in 76f4677 (fixes #26) 2018-01-06 19:03:18 +01:00
Philipp Klaus e5d4fde7d5 Correct Brother DK-11241 label size "102x152", fixes #27 2018-01-06 18:25:21 +01:00
Philipp Klaus 69d8b0395f brother_ql_print network backend timeout fix (#23) 2017-10-18 23:55:52 +02:00
Philipp Klaus e27bc9d491 brother_ql_analyze can now read from stdin (with '-') 2017-10-18 23:28:46 +02:00
Philipp Klaus aaf9a085b8 brother_ql_print: log discovered devices to stderr 2017-10-06 22:02:30 +02:00
Philipp Klaus 2f3655b648 Allow low quality printing with --lq 2017-10-06 22:01:52 +02:00
Philipp Klaus a354cde4eb New --600dpi flag to support 600x300 dpi mode 2017-10-01 20:59:05 +02:00
Philipp Klaus 88c0920768 create_label() convert rotate to int() early on if not 'auto' 2017-10-01 13:26:37 +02:00
Russ Garrett f8eec9a410 Readme updates for QL-800
This seems to work fine on the QL-800, thanks! I've added a tick against
it.

I've also slightly updated the help for `brother_ql_create` to make it
clear that you have to enable the --red option to print on tape which
supports red, otherwise the printer reports an error.

(This happens with the P-Touch software too and it's really unclear what
you're doing wrong.)
2017-09-23 10:33:24 +02:00
Philipp Klaus fae49bc1dc brother_ql_print fix --list-printers to print all found printers 2017-09-19 21:57:59 +02:00
Philipp Klaus 5b3d70842e brother_ql_analyze: improved INFO output 2017-09-19 21:12:05 +02:00
Philipp Klaus 467c15ef0f raise exception (instead of sys.exit()) in create_label()
create_label() is the most important function to be used (imported)
by other Python scripts and packages. It shouldn't force its calling
code or program to terminate in case of invalid input.
2017-09-19 21:06:39 +02:00
Philipp Klaus baea505a46 brother_ql_create: fix b/w label creation from .gif files 2017-09-19 21:04:47 +02:00
Philipp Klaus ee16bd68bb pushing version to v0.8.dev0 2017-09-19 14:25:43 +02:00
Philipp Klaus b96cd35ea1 prevent using --red (two color printing) if not supported by model 2017-09-19 14:23:18 +02:00
Philipp Klaus d373acbbc7 collection of similar software with a link in the README 2017-09-19 13:52:41 +02:00
Philipp Klaus 27c35710cd also apply --threshold to --red labels 2017-09-19 13:02:47 +02:00
Philipp Klaus a15084ad02 Convert indexed images (GIF) to RGB (if printing in --red) 2017-09-19 12:54:49 +02:00
Philipp Klaus 610954f800 brother_ql_create --red speedup (saving 90% CPU time)
The dissection of the color into red, black, & white now
takes part in the HSV color space (instead of HLS before).
Pillow's built-in capabilities to convert RGB → HSV
are now used.

While the creation of --red labels still takes 16 times longer
than the simple black/white ones, it is now 90% less time than
before this commit.
2017-09-19 12:49:00 +02:00
Philipp Klaus f52afbac62 brother_ql_analyze: black overrides red 2017-09-19 10:43:21 +02:00
Philipp Klaus ed97975b9c QL-800 series: printing black/red/white labels (CLI: --red) 2017-09-19 10:42:12 +02:00
Philipp Klaus f1fd99f9a7 brother_ql_create new CLI argument --compress
* create_label() now accepts a new keyword argument compress.
  The default is False → no compression if not set manually.
  This will speed-up the label creation in many cases
  at the expense of larger file sizes. Set to True if you
  don't care about processing time but want to store the
  generated label files.
* The brother_ql_create CLI offers this via the new
  argument --compress.
  New default (if not set): no compression.
2017-09-18 21:05:50 +02:00
Philipp Klaus 00c2cb9712 fix documentation of usb:// descriptor string 2017-09-17 22:04:00 +02:00
Philipp Klaus ee69e04f80 round labels: state actual / expected size when failing 2017-09-17 21:33:02 +02:00
Philipp Klaus e2b7e2d7f6 create_label(): first .paste(), then .convert("L")
The advantage is that the conversion to grayscale is now done
in the same way for all labels just before the conversion
to b/w.
The memory footprint shouln't increase too much.
And profiling showed that the the performance for small labels
that need pasting didn't deteriorate.
2017-09-17 21:28:17 +02:00
Philipp Klaus 11227c0db6 brother_ql_create: new CLI parameter --dither 2017-09-17 20:44:08 +02:00
Philipp Klaus d681d0ee9c new kwarg dither in create_label() 2017-09-17 18:50:03 +02:00
Philipp Klaus 707c33ffff QL-820NWB is now supported, printing red/black/white not yet 2017-09-16 22:42:59 +02:00
Philipp Klaus 555a51a0ad adding device dependent settings for QL-800 series 2017-09-16 12:23:34 +02:00
Philipp Klaus f2c7dbcbce brother_ql_analyze now supports .bin files for the QL-800 series 2017-09-16 12:15:43 +02:00
Philipp Klaus b60d140ff4 README: new QL-800 series 2017-08-20 09:35:28 +02:00
Philipp Klaus 3584b6ba5d Merge pull request #16 from iegomez/master (w/o multiprocessing)
Speed up implementation
2017-07-03 11:05:36 +02:00
Philipp Klaus 2c8620f94e raster.py: Py2 compat 2017-07-03 09:46:15 +02:00
Philipp Klaus 670068ce95 removed multiprocessing for now 2017-07-03 09:45:56 +02:00
Ignacio Gómez 0cc7d1febf Cores optional param, change to BytesIO and code cleanup. 2017-02-21 10:40:48 -03:00
Ignacio Gómez af41f52aa9 Threshold changed. 2017-02-20 12:54:23 -03:00
Ignacio Gómez 9e495b813f Code case fix. 2017-02-20 12:49:07 -03:00
Ignacio Gómez e2ae0ffaf0 Speed improvements. 2017-02-20 12:39:52 -03:00
Philipp Klaus f0d924b6f6 Adding/fixing support for round labels 2017-01-01 17:13:31 +01:00
Philipp Klaus 70f500b8d0 QL-550 marked as supported 2016-12-31 17:46:01 +01:00
Daniel Salamy 354eb010c6 added cutting support for the QL-550 2016-12-31 17:43:34 +01:00
Philipp Klaus 6e757e1ba9 brother_ql_print's instruction_file argument now accepts - for stdin 2016-12-29 09:09:22 +01:00
Philipp Klaus 5e7855eecf adding 'name' to the label_type_specs and making it more readable 2016-12-29 09:07:55 +01:00
Philipp Klaus a4dc9e89f3 Also use transparency fix from 69ba25e for die-cut labels 2016-12-22 23:22:28 +01:00
Philipp Klaus 69ba25ee1a Fix: images with a transparency layer now use a white background 2016-12-20 14:00:25 +01:00
Philipp Klaus a8fcd553de README: link to DEBUG docs fixed 2016-12-18 12:06:29 +01:00
Philipp Klaus 15788ccbe6 PyUSB backend: specify both timeouts in ms 2016-12-17 20:18:56 +01:00
Philipp Klaus 6173a4a470 fix PyUSB backend timeout for long labels 2016-12-17 20:18:13 +01:00
Philipp Klaus 35eae0ab99 fix regression from 44228e6 concerning compression 2016-12-15 20:24:29 +01:00