Closed biancofla closed 3 years ago
Hmm, I can't seem to reproduce this or find the cause, could you place these lines in fingerpaint.py
at line 86:
print('-------')
print((int(projected_start[0] * aa_factor), int(projected_start[1] * aa_factor),
int(projected_end[0] * aa_factor), int(projected_end[1] * aa_factor)))
print('width=', int(args.line_thickness * aa_factor))
It should be right before the call to image_canvas.line
.
Post the output here and I'll try to solve it :)
Also:
pip install .
afterwards if modifying the sourceThe complete output of the command fingerpaint -o hello.png
is the following:
Using touchpad: SYNA2393:00 06CB:7A13 Touchpad
-------
(2853, 1562, 2853, 1562)
width= 48
Traceback (most recent call last):
File "/home/<user>/.local/bin/fingerpaint", line 8, in <module>
sys.exit(cli())
File "/home/<user>/.local/lib/python3.8/site-packages/fingerpaint/fingerpaint.py", line 292, in cli
main(args)
File "/home/<user>/.local/lib/python3.8/site-packages/fingerpaint/fingerpaint.py", line 211, in main
make_ui(handler_loop(), scaled, devname, args)
File "/home/<user>/.local/lib/python3.8/site-packages/fingerpaint/fingerpaint.py", line 90, in make_ui
image_canvas.line(
File "/usr/lib/<user>/dist-packages/PIL/ImageDraw.py", line 161, in line
angles = [
File "/usr/lib/python3/dist-packages/PIL/ImageDraw.py", line 162, in <listcomp>
math.degrees(math.atan2(end[0] - start[0], start[1] - end[1]))
TypeError: 'int' object is not subscriptable
OS is Ubuntu 20.04 with GNOME 3.36.8.
Found the problem, the version of pillow
that comes with ubuntu is old and uses a different signature for ImageDraw.line
. I'll fix it on my side, 1 sec.
Thanks for the report :D
Fixed in #10 (link to release) :D
Hi, when I try to run fingerpaint, I encounter the following issue:
Touchpad used is SYNA2393:00 06CB:7A13, OS is Ubuntu 20.04 with GNOME 3.36.8.