Skip to content

Commit 5ca6914

Browse files
matmairTh00z
andauthored
fix ANTIALIAS (#37)
* fix: replaced removed Image.ANTIALIAS call with new PIL way * feat: bumped pillow version to min 10.0.0 --------- Co-authored-by: Lennart Haas <[email protected]>
1 parent dcc452c commit 5ca6914

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

brother_ql/conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def convert(qlr, images, label, **kwargs):
110110
im = im.resize((im.size[0]//2, im.size[1]))
111111
if im.size[0] != dots_printable[0]:
112112
hsize = int((dots_printable[0] / im.size[0]) * im.size[1])
113-
im = im.resize((dots_printable[0], hsize), Image.ANTIALIAS)
113+
im = im.resize((dots_printable[0], hsize), Image.LANCZOS)
114114
logger.warning('Need to resize the image...')
115115
if im.size[0] < device_pixel_width:
116116
new_im = Image.new(im.mode, (device_pixel_width, im.size[1]), (255,)*len(im.mode))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
"click",
1212
"future",
1313
"packbits",
14-
"pillow>=3.3.0",
14+
"pillow>=10.0.0",
1515
"pyusb",
1616
"attrs",
1717
"typing;python_version<'3.5'",

setup.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# -*- coding: utf-8 -*-
2+
3+
try:
4+
from setuptools import setup
5+
except ImportError:
6+
from distutils.core import setup
7+
8+
try:
9+
import pypandoc
10+
LDESC = open('README.md', 'r').read()
11+
LDESC = pypandoc.convert(LDESC, 'rst', format='md')
12+
except (ImportError, IOError, RuntimeError) as e:
13+
print("Could not create long description:")
14+
print(str(e))
15+
LDESC = ''
16+
17+
setup(name='brother_ql',
18+
version = '0.9.dev0',
19+
description = 'Python package to talk to Brother QL label printers',
20+
long_description = LDESC,
21+
author = 'Philipp Klaus',
22+
author_email = '[email protected]',
23+
url = 'https://github.com/pklaus/brother_ql',
24+
license = 'GPL',
25+
packages = ['brother_ql',
26+
'brother_ql.backends'],
27+
entry_points = {
28+
'console_scripts': [
29+
'brother_ql = brother_ql.cli:cli',
30+
'brother_ql_analyse = brother_ql.brother_ql_analyse:main',
31+
'brother_ql_create = brother_ql.brother_ql_create:main',
32+
'brother_ql_print = brother_ql.brother_ql_print:main',
33+
'brother_ql_debug = brother_ql.brother_ql_debug:main',
34+
'brother_ql_info = brother_ql.brother_ql_info:main',
35+
],
36+
},
37+
include_package_data = False,
38+
zip_safe = True,
39+
platforms = 'any',
40+
install_requires = [
41+
"click",
42+
"future",
43+
"packbits",
44+
"pillow>=10.0.0",
45+
"pyusb",
46+
'attrs',
47+
'typing;python_version<"3.5"',
48+
'enum34;python_version<"3.4"',
49+
],
50+
extras_require = {
51+
#'brother_ql_analyse': ["matplotlib",],
52+
#'brother_ql_create' : ["matplotlib",],
53+
},
54+
keywords = 'Brother QL-500 QL-550 QL-560 QL-570 QL-700 QL-710W QL-720NW QL-800 QL-810W QL-820NWB QL-1050 QL-1060N',
55+
classifiers = [
56+
'Development Status :: 4 - Beta',
57+
'Operating System :: OS Independent',
58+
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
59+
'Programming Language :: Python',
60+
'Programming Language :: Python :: 3',
61+
'Topic :: Scientific/Engineering :: Visualization',
62+
'Topic :: System :: Hardware :: Hardware Drivers',
63+
]
64+
)
65+
66+
67+

0 commit comments

Comments
 (0)